On 18/12/20 7:01 am, Paul Sokolovsky wrote:
Now, what if you have an object attribute which stores a callable (no
matter is it's bound method, a function, a class, or whatever)?

You will need to call it as "(obj.callable_ref)(arg, kw=val)".

So, in strict mode, this:

import random
n = random.choice([1,2,3])

would have to be written:

import random
n = (random.choice)([1,2,3])

I would find that quite unpleasant.

--
Greg
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/3TSES4AJQ3NQYDFUKG6CHHD376HYPOLL/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to