On 20 November 2017 at 20:51, Guido van Rossum wrote:
> Yeah, I don't think there's an action item here except *maybe* changes to
> the wording of the PEP. Ivan?
>
Yes, I will make a small PR with a more detailed description of how
__getattr__ works.
--
Ivan
Yeah, I don't think there's an action item here except *maybe* changes to
the wording of the PEP. Ivan?
On Mon, Nov 20, 2017 at 12:33 AM, Serhiy Storchaka
wrote:
> 20.11.17 03:02, Guido van Rossum пише:
>
>> Serhiy's definition sounds recursive (defining __getattr__ to define the
>> behavior of
20.11.17 03:02, Guido van Rossum пише:
Serhiy's definition sounds recursive (defining __getattr__ to define the
behavior of __getattr__) but Mark's suggestion makes his intention
unclear since the error message is still the same.
It is recursive only when the '__dict__' attribute is not define
Given that we're also allowing customization of __dir__ I wouldn't want to
link this to __dir__. But maybe you meant to say that vars() is the public
interface for __dict__. Even if it were, in the case of specifying this
particular customization for this PEP, I strongly prefer to write it in
terms
On Sun, Nov 19, 2017 at 05:34:35PM -0800, Guido van Rossum wrote:
> On Sun, Nov 19, 2017 at 4:57 PM, Steven D'Aprano
> wrote:
> > A minor point: this should(?) be written in terms of the public
> > interface for accessing namespaces, namely:
> >
> > getter = vars(mod)["__getattr__"]
On Sun, Nov 19, 2017 at 4:57 PM, Steven D'Aprano
wrote:
> On Sun, Nov 19, 2017 at 08:24:00PM +, Mark Shannon wrote:
> > Just one comment. Could the new behaviour of attribute lookup on a
> > module be spelled out more explicitly please?
> >
> >
> > I'm guessing it is now something like:
> >
>
Serhiy's definition sounds recursive (defining __getattr__ to define the
behavior of __getattr__) but Mark's suggestion makes his intention unclear
since the error message is still the same. Also the word "now" is confusing
(does it mean "currently, before the PEP" or "once this PEP is accepted"?)
On Sun, Nov 19, 2017 at 08:24:00PM +, Mark Shannon wrote:
> Hi,
>
> Just one comment. Could the new behaviour of attribute lookup on a
> module be spelled out more explicitly please?
>
>
> I'm guessing it is now something like:
>
> `module.__getattribute__` is now equivalent to:
>
> def _
On 19/11/17 20:41, Serhiy Storchaka wrote:
19.11.17 22:24, Mark Shannon пише:
Just one comment. Could the new behaviour of attribute lookup on a
module be spelled out more explicitly please?
I'm guessing it is now something like:
`module.__getattribute__` is now equivalent to:
def __getat
19.11.17 22:24, Mark Shannon пише:
Just one comment. Could the new behaviour of attribute lookup on a
module be spelled out more explicitly please?
I'm guessing it is now something like:
`module.__getattribute__` is now equivalent to:
def __getattribute__(mod, name):
try:
retur
10 matches
Mail list logo