<div dir="ltr"><div>Absolutely -1 on this. Consider the following example:</div><div><br></div><div>def encode(s, *args):</div><div>    """Force UTF 8 no matter what!"""<br></div><div>    return s.encode('utf8')</div><div><br></div><div>text = "Hello, there!"</div><div>text .= encode('latin1')</div><div><br></div><div>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.<br></div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Sep 27, 2018 at 6:49 AM Ken Hilton <<a href="mailto:kenlhilton@gmail.com">kenlhilton@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:monospace,monospace;font-size:small;color:#0000ff">Hi Jasper,</div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small;color:#0000ff">This seems like a great idea! It looks so much cleaner, too.</div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small;color:#0000ff"><br></div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small;color:#0000ff">Would there be a dunder method handling this? Or since it's explicitly just a syntax for "obj = obj.method()" is that not necessary?</div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small;color:#0000ff">My only qualm is that this might get PHP users confused; that's really not an issue, though, since Python is not PHP.</div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small;color:#0000ff"><br></div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small;color:#0000ff">Anyway, I fully support this idea.</div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small;color:#0000ff"><br></div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small;color:#0000ff">Sincerely,</div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small;color:#0000ff">Ken Hilton;</div></div>
_______________________________________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org" target="_blank">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" rel="noreferrer" target="_blank">http://python.org/psf/codeofconduct/</a><br>
</blockquote></div>