On 2018-09-27 14:13, Calvin Spealman wrote:
Absolutely -1 on this. Consider the following example:
def encode(s, *args):
"""Force UTF 8 no matter what!"""
return s.encode('utf8')
text = "Hello, there!"
text .= encode('latin1')
Do you see how this creates an ambiguous situation? Implicit attribute
lookup like this is really confusing. It reminds me of the old `with`
construct in javascript that is basically forbidden now, because it
created the same situation.
I don't believe it's ambiguous. The intention is that:
text .= encode('latin1')
would be equivalent to:
text = text.encode('latin1')
However, I'm also -1 on it.
[snip]
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/