A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-September/028960.html below:

[Python-Dev] Keyword for first argument of methods?

[Python-Dev] Keyword for first argument of methods? [Python-Dev] Keyword for first argument of methods?David Abrahams dave@boost-consulting.com
Fri, 27 Sep 2002 10:45:22 -0400
Hi,

When implementing keyword argument support for Boost.Python, I noticed the
following. I'm sure it's not worth a lot of effort to change this behavior,
but I thought someone might like to know:

>>> class X:
...     def foo(self, y): print y
...
>>> X.foo(y = 1, self = X())
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: unbound method foo() must be called with X instance as first
argument (got nothing instead)

-Dave

-----------------------------------------------------------
           David Abrahams * Boost Consulting
dave@boost-consulting.com * http://www.boost-consulting.com






RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4