Re: [Dolfin] itercell and consistency in Python interface of DOLFIN

2011-01-21 Thread Johan Hake
On Friday January 21 2011 07:08:26 Joachim Berdal Haga wrote: > > Compare the values and itervalues method in a dict. I would expect > > cell(mesh) to return a list of cells or somthing. > > Note that this changes in py3, where most of the APIs are changed to > return iterators (or views) instead

Re: [Dolfin] itercell and consistency in Python interface of DOLFIN

2011-01-21 Thread Joachim Berdal Haga
> Compare the values and itervalues method in a dict. I would expect cell(mesh) > to return a list of cells or somthing. Note that this changes in py3, where most of the APIs are changed to return iterators (or views) instead of lists, and iter* are removed. http://docs.python.org/release/3.0.1/w

Re: [Dolfin] itercell and consistency in Python interface of DOLFIN

2011-01-21 Thread Anders Logg
On Fri, Jan 21, 2011 at 05:49:08AM -0800, Johan Hake wrote: > On Friday January 21 2011 01:16:24 Anders Logg wrote: > > 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 > > > iterc

Re: [Dolfin] itercell and consistency in Python interface of DOLFIN

2011-01-21 Thread Johan Hake
On Friday January 21 2011 01:16:24 Anders Logg wrote: > 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' com

Re: [Dolfin] itercell and consistency in Python interface of DOLFIN

2011-01-21 Thread Anders Logg
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 cell

[Dolfin] itercell and consistency in Python interface of DOLFIN

2011-01-20 Thread Johan Hake
Hello! For awhile I have wanted to change the naming of cells, vertices, aso to itercells, itervertices, as it would be more Pythonic. I also wonder if we should change the naming of MeshFunction.values to MeshFunction.array. I think cells is just to general. What you say? This will