> * Functions having the same signature share the same annotation tuple.
Is this true with code that have a mutable default?
>>> def a(arg = []):
... arg.append('a')
... return arg
...
>>> def b(arg = []):
... arg.append('b')
... return arg
...
>>> a()
['a']
>>> a()
['a', 'a']
>>> a()
['a', 'a', 'a']
>>> b()
['b']
>>> b()
['b', 'b']
>>> b()
['b', 'b', 'b']
_______________________________________________
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at
https://mail.python.org/archives/list/[email protected]/message/5Y7PU6HAXGGG5TGNLTLAGQXDSPW65ZK2/
Code of Conduct: http://python.org/psf/codeofconduct/