By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,968 Members | 1,541 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,968 IT Pros & Developers. It's quick & easy.

type method-wrapper?

P: n/a
Hi,
l=[]
print type(l.__delattr__)
# --> <type 'method-wrapper'>

I didn't find a corresponding type in the modules "types".
Is it missing or am I blind?

(Python 2.3.3)

--
Thomas GŁttler, http://www.thomas-guettler.de/
Jul 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Thomas Guettler wrote:
Hi,
l=[]
print type(l.__delattr__)
# --> <type 'method-wrapper'>

I didn't find a corresponding type in the modules "types".
Is it missing or am I blind?

(Python 2.3.3)


I don't have the answer to the question, but perhaps this sheds a little
more light on it?

Python 2.3.4 (#53, May 25 2004, 21:17:02) [MSC v.1200 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
l = []
type(l.__delattr__) <type 'method-wrapper'> import types
for t in dir(types): .... if t[-4:] == 'Type' and isinstance(l.__delattr__, getattr(types, t)):
.... print "It's a '%s'" % str(t)
....
It's a 'ObjectType'


I also am interested in what <type method-wrapper> is.

regards,

--
alan kennedy
------------------------------------------------------
email alan: http://xhaus.com/contact/alan
Jul 18 '05 #2

P: n/a

"Thomas Guettler" <gu*****@thomas-guettler.de> wrote in message
news:pa****************************@thomas-guettler.de...
Hi,
l=[]
print type(l.__delattr__)
# --> <type 'method-wrapper'>

I didn't find a corresponding type in the modules "types".
Is it missing or am I blind?

(Python 2.3.3)

method_wrapper is an implementation type, not a language type in the same
way that int, list, function, etc are. I suspect that there are others
'missing' from the types module that you have not discovered yet.

Terry J. Reedy

Jul 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.