"builtin" methods 
Author Message
 "builtin" methods

 Is there a list of all the "__xxx__" functions (eg __cmp__, __len__)
somewhere?

 Thanks in advance, jp

--
Where a calculator on the ENIAC is equipped with 18,000 vacuum tubes and
weighs 30 tons, computers in the future may have only 1,000 vacuum tubes
and
weigh only 1.5 tons.    -- Popular Mechanics, March 1949
--
 6:40pm up 9 days, 1:09, 0 users, load average: 0.17, 0.08, 0.02



Sun, 01 Sep 2002 03:00:00 GMT  
 "builtin" methods

Quote:

> Is there a list of all the "__xxx__" functions (eg __cmp__, __len__)
> somewhere?

See the python Reference Manual, Section 3.3: Special Method Names.

Neel



Sun, 01 Sep 2002 03:00:00 GMT  
 "builtin" methods


Quote:

>  Is there a list of all the "__xxx__" functions (eg __cmp__, __len__)
> somewhere?

Sure:  http://www.python.org/doc/current/ref/specialnames.html

Paragraphs 3.3.1 to 3.3.6 have all these methods. (Well, I think it's all
of them... :)


Homepage: http://www.hvision.nl/~ivnowa/newsite/
Python questions? See http://tor.dhs.org/~zephyrfalcon/snippets
You call me a masterless man. You are wrong. I am my own master.



Mon, 02 Sep 2002 03:00:00 GMT  
 "builtin" methods

Quote:

> Paragraphs 3.3.1 to 3.3.6 have all these methods. (Well, I think it's all
> of them... :)

I noticed the "special" names used by pickle are not mentioned
(__getstate__, __setstate__, __getinitargs__) are not mentioned. But
then, they aren't really that special, either :-)

Regards,
Martin



Sat, 07 Sep 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. "methods" method

2. string.join(["Tk 4.2p2", "Python 1.4", "Win32", "free"], "for")

3. Builtin methods versus Builtin Functions -- help!

4. BEGIN{want[]={"s1o", "s2o", "s2q", "s3q"}

5. Smalllint reporting "Methods with full blocks"

6. "Union:" method

7. newbie question: "new" class method

8. : script CGI - clipper 5.2 - Method="POST"

9. "Formal" testing methods in Forth

10. role of reserved word "method"

11. "benchmark.rb:435: warning: obsolete method"

12. are functions/methods "first class objects"?

 

 
Powered by phpBB® Forum Software