[Python-3000] Use case for generics
Georg Brandl
g.brandl at gmx.net
Sun May 14 09:29:17 CEST 2006
Greg Ewing wrote:
> Talin wrote:
>
>> r = Rectangle( x, y, w, h )
>> r = Rectangle( minpos, maxpos )
>> r = Rectangle( position, size )
>
> This sort of thing is better done in Python using
> keyword arguments:
>
> Rectangle(left = x, top = y, width = w, height = h)
> Rectangle(topleft = (x, y), size = (w,h))
> Rectangle(topleft = (x0, y0), botright = (x1, y1))
... and which looks like another possible use case for keyword-only
arguments.
Georg
More information about the Python-3000
mailing list