Thnak you all.
In the future, explain didn't work.
Wrong output? give actual (copy and paste) and expected.
Error message? give traceback (copy and paste).
I will be careful.
--
http://mail.python.org/mailman/listinfo/python-list
The following code didn't work:
class X(object):
def f(self, **kwds):
print kwds
try:
print kwds['i'] * 2
except KeyError:
print unknown keyword argument
self.g(string, **kwds)
On Sun, 2009-02-22 at 11:44 -0800, Ravi wrote:
The following code didn't work:
snip
def g(self, s, kwds):
print s
print kwds
This expects the function g to be called with the parameters s and
kwds
snip
def g(self, s, **kwds):
I am sorry about the typo mistake, well the code snippets are as:
# Non Working:
class X(object):
def f(self, **kwds):
print kwds
try:
print kwds['i'] * 2
except KeyError:
print unknown keyword argument
self.g(string, kwds)
def g(self, s, **kwds):
print s
print
On Sun, 2009-02-22 at 11:44 -0800, Ravi wrote:
The following code didn't work:
class X(object):
def f(self, **kwds):
print kwds
try:
print kwds['i'] * 2
except KeyError:
print unknown
On Sun, 2009-02-22 at 12:09 -0800, Ravi wrote:
I am sorry about the typo mistake, well the code snippets are as:
# Non Working:
class X(object):
def f(self, **kwds):
print kwds
try:
print kwds['i'] * 2
except KeyError:
print unknown keyword argument
self.g(string,
Ravi wrote:
The following code didn't work:
In the future, explain didn't work.
Wrong output? give actual (copy and paste) and expected.
Error message? give traceback (copy and paste).
--
http://mail.python.org/mailman/listinfo/python-list