>> > It could be that the result overloads the __getattr__-method to delegate
>> > calls to some object. Thus it's not part of the outer instance.
>>
>
> Didn't I read that Py3 will support a __dir__ method so that classes
> *could* report such pseudo-attributes in response to dir?
>
> -- Paul
Paul McGuire wrote:
On Jun 5, 7:11 am, Tomohiro Kusumi <[EMAIL PROTECTED]>
wrote:
It could be that the result overloads the __getattr__-method to delegate
calls to some object. Thus it's not part of the outer instance.
Didn't I read that Py3 will support a __dir__ method so that classes
*could
On Jun 5, 7:11 am, Tomohiro Kusumi <[EMAIL PROTECTED]>
wrote:
>
> > It could be that the result overloads the __getattr__-method to delegate
> > calls to some object. Thus it's not part of the outer instance.
>
Didn't I read that Py3 will support a __dir__ method so that classes
*could* report suc
Diez,
Thanks, you're right.
Delegated attributes are not in the dir() result.
>>> getattr(reg, "pattern")
'[0-9]+'
>>> getattr(reg, "flags")
0
>>> getattr(reg, "groupindex")
{}
Tomohiro Kusumi
> Tomohiro Kusumi schri
Tomohiro Kusumi schrieb:
> Hi,
>
> I have a question regarding re module.
> # By the way I'm not in this list, so I'm sorry but please CC me.
>
> I tried following code in Python shell using a regular expression.
> Why doesn't the result of dir(reg) have &
Hi,
I have a question regarding re module.
# By the way I'm not in this list, so I'm sorry but please CC me.
I tried following code in Python shell using a regular expression.
Why doesn't the result of dir(reg) have 'pattern', 'flags', and
'group