[Python-ideas] Match statement brainstorm
michael.selik at gmail.com
Mon May 30 05:07:37 EDT 2016
On Sun, May 29, 2016 at 7:00 PM Greg Ewing <greg.ewing at canterbury.ac.nz>
> Franklin? Lee wrote:
> > On May 28, 2016 4:48 AM, "Greg Ewing" <greg.ewing at canterbury.ac.nz
> > <mailto:greg.ewing at canterbury.ac.nz>> wrote:
> > >
> > > No, keyword pattern args should probably match either
> > > keyword constructor args or attributes.
> > That would make things ambiguous and tricky, wouldn't it?
> My feeling is that for any well-designed object they
> should be compatible. If an object has a constructor
> keyword arg and an attribute with the same name but
> they mean different things, that object is confusing
> to begin with.
What about Fraction -- it has ``numerator`` and ``denominator`` for keyword
arguments, but also has an extra stuff like ``real`` and ``imag`` inherited
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas