Re: Question regarding re module

2008-06-05 Thread Tobiah
>> > 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

Re: Question regarding re module

2008-06-05 Thread Tim Golden
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

Re: Question regarding re module

2008-06-05 Thread Paul McGuire
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

Re: Question regarding re module

2008-06-05 Thread Tomohiro Kusumi
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

Re: Question regarding re module

2008-06-05 Thread Diez B. Roggisch
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 &

Question regarding re module

2008-06-04 Thread Tomohiro Kusumi
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