From: Smith
On 06/09/2016 11:23, Peter Otten wrote:
> If so look at
>
>> > ...: def __str__(self):
>> > ...: return "Visitor: %i, Contacts: %i %
>> > (self.visits,self.contacts)"
> once more. Where are the quotes? Where should the be?
>
>
>
I solved the problem.
thank you Pe
On 06/09/2016 11:23, Peter Otten wrote:
> If so look at
>
>> > ...: def __str__(self):
>> > ...: return "Visitor: %i, Contacts: %i %
>> > (self.visits,self.contacts)"
> once more. Where are the quotes? Where should the be?
>
>
>
I solved the problem.
thank you Peter
--
https
On 06/09/2016 11:23, Peter Otten wrote:
If so look at
> ...: def __str__(self):
> ...: return "Visitor: %i, Contacts: %i %
> (self.visits,self.contacts)"
once more. Where are the quotes? Where should the be?
I solved the problem.
thank you Peter
--
https://mail.python
Smith wrote:
> you can help me ?
Yes ;) But you might consider posting on python-tutor instead of python-
list.
> I can not understand where is the error in this script.
It's always a good idea to state both what you expect and what you get
instead explicitly, in plain english.
> In [72]: day
monkeys paw wrote:
OK, i overlooked that and the error was not very enlightening.
Thanks very much.
"module.__init__() takes at most 2 arguments (3 given)"
Are you sure about the clueless error message ? :)
JM
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, 20 Mar 2011 00:08:16 +, Rhodri James wrote:
> It has to be said that the confusion is exacerbated by ignoring PEP-8
> and using the same (CamelCase) name for the module and the class. That
> does provide a rich source of errors in cases like this.
It's not so much that UserDict ignore
On Sat, 19 Mar 2011 02:15:55 -, Terry Reedy wrote:
On 3/18/2011 5:27 PM, monkeys paw wrote:
TypeError: Error when calling the metaclass bases
module.__init__() takes at most 2 arguments (3 given)
OK, i overlooked that and the error was not very enlightening.
A detailed explanation: ever
On 3/18/2011 5:27 PM, monkeys paw wrote:
TypeError: Error when calling the metaclass bases
module.__init__() takes at most 2 arguments (3 given)
OK, i overlooked that and the error was not very enlightening.
A detailed explanation: every module is an instance of a class we will
call Module. E
On 3/18/2011 4:43 PM, Alexander Kapps wrote:
On 18.03.2011 21:13, monkeys paw wrote:
I have the following file:
FileInfo.py:
import UserDict
After this import statement, the name "UserDict" refers to the module.
class FileInfo(UserDict):
Here you are trying to subclass the module. What y
On 18.03.2011 21:13, monkeys paw wrote:
I have the following file:
FileInfo.py:
import UserDict
After this import statement, the name "UserDict" refers to the module.
class FileInfo(UserDict):
Here you are trying to subclass the module. What you need instead is:
class FileInfo(UserDict.U
monkeys paw wrote:
I have the following file:
FileInfo.py:
import UserDict
class FileInfo(UserDict):
"store file metadata"
def __init__(self, filename=None):
UserDict.__init__(self)
self["name"] = filename
When i import it like so:
import FileInfo
i get this error
On 18/03/2011 20:13, monkeys paw wrote:
I have the following file:
FileInfo.py:
import UserDict
class FileInfo(UserDict):
"store file metadata"
def __init__(self, filename=None):
UserDict.__init__(self)
self["name"] = filename
When i import it like so:
import FileIn
12 matches
Mail list logo