"bartc" wrote in message
news:xl_4n.28001$ym4.5...@text.news.virginmedia.com...
> Any particular reason why two, and not one (or three)? In some fonts it's
> difficult to
> tell how many as they run together.
It follows the C convention for reserved identifers.
--
http://mail.python.org/
bartc wrote:
"Wolfgang Rohdewald" wrote in message
news:mailman.1056.1263771299.28905.python-l...@python.org...
On Monday 18 January 2010, BarryJOgorman wrote:
TypeError: object._new_() takes no parameters
def _init_(self, name, job=None, pay=0):
__init__ needs two underscores left
"Wolfgang Rohdewald" wrote in message
news:mailman.1056.1263771299.28905.python-l...@python.org...
On Monday 18 January 2010, BarryJOgorman wrote:
TypeError: object._new_() takes no parameters
def _init_(self, name, job=None, pay=0):
__init__ needs two underscores left and right
An
On Monday 18 January 2010, BarryJOgorman wrote:
> TypeError: object._new_() takes no parameters
> def _init_(self, name, job=None, pay=0):
__init__ needs two underscores left and right
--
Wolfgang
--
http://mail.python.org/mailman/listinfo/python-list
On Jan 17, 11:09 pm, John Bokma wrote:
> BarryJOgorman writes:
> > class Person:
> > def _init_(self, name, job=None, pay=0):
>
> def __init__(self, name, job=None, pay=0):
>
> Note 2x _ before and after init.
>
> --
> John Bokma
On Sun, Jan 17, 2010 at 15:05 -0800, BarryJOgorman wrote:
[...]
> class Person:
> def _init_(self, name, job=None, pay=0):
^^ --> __init__(self, ...
It's __init__() not _init_()!
Have fun learning Python!
--
.''`. Wolodja Wentland
: :' :
`. `'` 4096R/CAF
BarryJOgorman wrote:
> Working through Lutz's 'Learning Python'
>
> Trying to run the following code (from file person.py - see below):
>
> The file is held in Python31.
>
> at the Python31 prompt am entering ''person.py'
>
> Getting the following error:
> Traceback (most recent call last)
> F
BarryJOgorman writes:
> class Person:
> def _init_(self, name, job=None, pay=0):
def __init__(self, name, job=None, pay=0):
Note 2x _ before and after init.
--
John Bokma j3b
Hacking & Hiking in Mexico - http://johnbokm
Working through Lutz's 'Learning Python'
Trying to run the following code (from file person.py - see below):
The file is held in Python31.
at the Python31 prompt am entering ''person.py'
Getting the following error:
Traceback (most recent call last)
File "C:python31\person.py", line 9, in (modu