Irit Katriel added the comment:
This seems to have been fixed by now, on 3.11 I get this:
>>> class A:
... def foo(self, x): pass
...
>>> A().foo()
Traceback (most recent call last):
File "", line 1, in
TypeError: A.foo() missing 1 required positional argument: 'x'
--
nosy:
Changes by Tshepang Lekhonkhobe tshep...@gmail.com:
--
nosy: +tshepang
versions: +Python 3.4 -Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2516
___
Changes by Éric Araujo mer...@netwok.org:
--
nosy: +eric.araujo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2516
___
___
Python-bugs-list
Alexander Belopolsky belopol...@users.sourceforge.net added the comment:
Here is a similar issue which may be easier to fix:
def f(a, b=None, *, c=None, d=None):
...pass
f(1,2,3)
Traceback (most recent call last):
File stdin, line 1, in module
TypeError: f() takes at most 4 arguments
Changes by Alexander Belopolsky belopol...@users.sourceforge.net:
--
assignee: belopolsky -
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2516
___
Changes by Alexander Belopolsky belopol...@users.sourceforge.net:
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2516
___
___
Python-bugs-list
Changes by Alexander Belopolsky belopol...@users.sourceforge.net:
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2516
___
___
Python-bugs-list
Changes by Alexander Belopolsky belopol...@users.sourceforge.net:
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2516
___
___
Python-bugs-list
Changes by Alexander Belopolsky belopol...@users.sourceforge.net:
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2516
___
___
Python-bugs-list
Benjamin Peterson benja...@python.org added the comment:
Fixed in r82220.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2516
___
___
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Maybe I'm misunderstanding what issue we're talking about here, but wasn't this
supposed to be fixed?
giampa...@ubuntu:~/svn/python-3.2$ python3.2
Python 3.2a0 (py3k:82220M, Jun 25 2010, 21:38:56)
[GCC 4.4.3] on linux2
Type help,
R. David Murray rdmur...@bitdance.com added the comment:
I presume Benjamin meant he fixed the special case Alexander reported.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2516
___
Giampaolo Rodola' g.rod...@gmail.com added the comment:
The same subject on python-dev raised last month received positive feedbacks:
http://mail.python.org/pipermail/python-dev/2010-May/100197.html
--
nosy: +giampaolo.rodola
___
Python tracker
R. David Murray rdmur...@bitdance.com added the comment:
All that is needed now is a working patch... :)
--
nosy: +r.david.murray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2516
___
Changes by Benjamin Peterson benja...@python.org:
--
versions: +Python 3.2 -Python 2.6
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2516
___
___
Changes by Alexander Belopolsky belopol...@users.sourceforge.net:
Removed file: http://bugs.python.org/file14759/unnamed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2516
___
Alexander Belopolsky belopol...@users.sourceforge.net added the comment:
gungor: your messages look mangled. It may be the case of email to trucker
bug. Can you briefly explain what you are trying to add to the discussion?
--
assignee: - belopolsky
Changes by Rodrigo Bernardo Pimentel r...@isnomore.net:
--
nosy: +rbp
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2516
___
___
Python-bugs-list
gungor gungorb...@gmail.com added the comment:
I am using Django with python to develope a web application.While I am
trying to syncronize and running the localserver, I get this issue(2516).
problem function is cagri()
Source Code:
from django.db import models
from datetime import datetime
from
gungor gungorb...@gmail.com added the comment:
TypeError at /admin/rt/randevu/add/
cagir() takes exactly 1 argument (2 given)
Request Method: GET Request URL:
http://127.0.0.1:8000/admin/rt/randevu/add/ Exception Type: TypeError
Exception
Value:
cagir() takes exactly 1 argument (2 given)
Changes by Benjamin Peterson benja...@python.org:
--
type: compile error - feature request
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2516
___
Changes by Benjamin Peterson benja...@python.org:
Removed file: http://bugs.python.org/file14758/unnamed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2516
___
gungor gungorb...@gmail.com added the comment:
I don't understand your message.You only send me my error message's xml
version
2009/8/21 Benjamin Peterson rep...@bugs.python.org
Changes by Benjamin Peterson benja...@python.org:
Removed file: http://bugs.python.org/file14758/unnamed
Changes by Guido van Rossum gu...@python.org:
--
nosy: -gvanrossum
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2516
___
___
Python-bugs-list
Alexander Belopolsky [EMAIL PROTECTED] added the comment:
On Thu, Apr 3, 2008 at 9:39 PM, Raymond Hettinger
[EMAIL PROTECTED] wrote:
It's definitely a bug
What would you say to the following:
def f(x):
pass
class X:
xf = f
x = X()
x.xf(1,2)
-- TypeError: f() takes exactly 1
Benjamin Peterson [EMAIL PROTECTED] added the comment:
Guido, what's your opinion on this? Is this a bug, and should it be fixed?
--
nosy: +gvanrossum
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2516
__
Raymond Hettinger [EMAIL PROTECTED] added the comment:
It's definitely a bug, but I think the reason it has been around so
long is that no-one has offerred a clean solution.
I was hoping for something along the lines of functions raising an
ArgumentError (a new subclass of TypeError) that
New submission from Alexander Belopolsky [EMAIL PROTECTED]:
Opening a new issue per Raymond's request at msg64764:
It would be *much* more useful to direct effort improving the mis-
reporting of the number of arguments given versus those required for
instance methods:
a.f(1, 2)
TypeError:
Changes by Ned Batchelder [EMAIL PROTECTED]:
--
nosy: +nedbat
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2516
__
___
Python-bugs-list mailing list
Unsubscribe:
Alexander Belopolsky [EMAIL PROTECTED] added the comment:
Attached patch (issue2516poc.diff) presents proof-of-concept code which
changes the problematic reporting as follows:
a.f(1,2)
Traceback (most recent call last):
File stdin, line 1, in module
TypeError: A object.f() takes exactly 0
Benjamin Peterson [EMAIL PROTECTED] added the comment:
You have +1 from me to continue developing this patch.
--
nosy: +benjamin.peterson
priority: - low
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2516
__
31 matches
Mail list logo