Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #78995
| Date | 2014-10-12 20:55 +0800 |
|---|---|
| Subject | TypeError: 'kwarg' is an invalid keyword argument for this function |
| From | roro codeath <rorocodeath@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.14784.1413118559.18130.python-list@python.org> (permalink) |
[Multipart message — attachments visible in raw view] - view raw
How to implement it in my class?
class Str(str):
def __init__(self, *args, **kwargs):
pass
Str('smth', kwarg='a')
# How to implement in my class
class C:
def __init__(self):
pass
class C2(C):
def __init__(self, *args, **kwargs):
pass
C2(kwarg='a')
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
TypeError: 'kwarg' is an invalid keyword argument for this function roro codeath <rorocodeath@gmail.com> - 2014-10-12 20:55 +0800 Re: TypeError: 'kwarg' is an invalid keyword argument for this function Rustom Mody <rustompmody@gmail.com> - 2014-10-12 06:46 -0700
csiph-web