Re: Python 3.0 plans



On Wed, 2007-08-29 at 13:52 -0400, Behdad Esfahbod wrote:
> 
>   - Do things more Pythonesque.  Looking at Pango bindings, for
> example
> replace all to_string() methods with __str__.  Same for compare(),
> equal(), etc.  Or should it be in addition? 

Other example I once really wanted was generator iterators on
PangoLayoutIter such as lines(), clusters(), ... so I can do:

i = layout.get_iter()
for line in i.lines():
	print line

But then the iterator object becomes redundant, so maybe add lines() on
the layout itself:

for line in layout.lines():
	print line


-- 
behdad
http://behdad.org/

"Those who would give up Essential Liberty to purchase a little
 Temporary Safety, deserve neither Liberty nor Safety."
        -- Benjamin Franklin, 1759






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]