kulpa / google-api-python-client

Automatically exported from code.google.com/p/google-api-python-client
Other
0 stars 0 forks source link

Passing a wrong arg name to a method raises TypeError, should be AttributeError #23

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Passing a wrong arg name to a method raises TypeError, should be AttributeError

Original issue reported on code.google.com by jcgregorio@google.com on 2 May 2011 at 3:43

GoogleCodeExporter commented 9 years ago
$ python
Python 2.7.2 (default, Sep 15 2011, 09:58:14) 
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> open(t=12)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: Required argument 'name' (pos 1) not found
>>> open('foo.txt', t=12)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 't' is an invalid keyword argument for this function
>>> 

Original comment by jcgregorio@google.com on 9 Nov 2011 at 7:04