Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #93781
| From | Ben Finney <ben+python@benfinney.id.au> |
|---|---|
| Subject | Re: Foo.__new__ is what species of method? |
| Date | 2015-07-14 15:17 +1000 |
| References | <mailman.478.1436849134.3674.python-list@python.org> <55a495ee$0$1580$c3e8da3$5496439d@news.astraweb.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.480.1436851067.3674.python-list@python.org> (permalink) |
Steven D'Aprano <steve+comp.lang.python@pearwood.info> writes: > py> class Spam(object): > ... def __new__(cls): > ... print cls > ... > py> Spam.__new__() # implicit first arg? > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > TypeError: __new__() takes exactly 1 argument (0 given) Thanks, I'm glad I checked before filing a bug report. Hopefully I'll remember that clear test, when I need to remember which species it is :-) -- \ “Instead of having ‘answers’ on a math test, they should just | `\ call them ‘impressions’, and if you got a different | _o__) ‘impression’, so what, can't we all be brothers?” —Jack Handey | Ben Finney
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Foo.__new__ is what species of method? Ben Finney <ben+python@benfinney.id.au> - 2015-07-14 14:45 +1000
Re: Foo.__new__ is what species of method? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-07-14 14:54 +1000
Re: Foo.__new__ is what species of method? Ben Finney <ben+python@benfinney.id.au> - 2015-07-14 15:17 +1000
Re: Foo.__new__ is what species of method? Stefan Behnel <stefan_ml@behnel.de> - 2015-07-14 08:26 +0200
csiph-web