dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #20884
Re: itercell and consistency in Python interface of DOLFIN
B1;2600;0cOn Thu, Jan 20, 2011 at 04:13:19PM -0800, Johan Hake wrote:
> Hello!
>
> For awhile I have wanted to change the naming of cells, vertices, aso to
> itercells, itervertices, as it would be more Pythonic.
Is 'iterfoo' common in Python? I haven't seen it before. So to me
for cell in cells(mesh):
...
still looks very neat.
The C++ iterators are also don't follow the regular C++ style but I
think
for (CellIterator cell(mesh); !cell.end(); ++cell)
looks better than
for (<something>::iterator cell = mesh.<something>.begin(); cell != mesh.<something>.end(); ++cell)
so we're not necessarily following the standard convention always if
we think we can do better.
> I also wonder if we should change the naming of
>
> MeshFunction.values
>
> to
>
> MeshFunction.array.
That sounds good.
--
Anders
> I think cells is just to general. What you say?
>
> This will be consistent with the vector, and matrix interface.
>
> Johan
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dolfin
> Post to : dolfin@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dolfin
> More help : https://help.launchpad.net/ListHelp
Follow ups
References