Michael Selik wrote:
On Sun, May 29, 2016 at 7:00 PM Greg Ewing
mailto:greg.ewing@canterbury.ac.nz> wrote: 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 from Complex?
All of those names are distinct, so there's no problem there. All of them would be usable as keywords when unpacking. Additionally you would be able to unpack 'numerator' and 'denominator' positionally, because the constructor accepts those positionally. -- Greg