[Python-ideas] Match statement brainstorm
Franklin? Lee
leewangzhong+python at gmail.com
Sun May 29 15:11:43 EDT 2016
On May 28, 2016 4:48 AM, "Greg Ewing" <greg.ewing at canterbury.ac.nz> wrote:
>
> Ethan Furman wrote:
>>
>> Meaning we can *only* match on constructor arguments? What about
attributes that are not set in the constructor, are we just out of luck for
those?
>
>
> No, keyword pattern args should probably match either
> keyword constructor args or attributes.
That would make things ambiguous and tricky, wouldn't it?
Any criticism for using
object(attrname0=v0, attrname1=v1)
for generalized attribute unpacking?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20160529/0344d187/attachment.html>
More information about the Python-ideas
mailing list