Declaration of an array of unspecified size
Bertel Lund Hansen
nospamius at lundhansen.dk
Sun Aug 31 16:29:50 CEST 2003
I am relatively new to Python but have som programming
experience. I am experimenting wit a POP3-program and it's fairly
I want to read the mails into an array of lists so I later can
choose which one to display. But I need to declare an array of
unknown size before I can use it in the code. How do I manage
host = ""
user = ""
password = "*"
mails = 0
mail # This is wrong but what do I do?
def __init__ (self):
for i in range(self.mails):
self.mail[i]=pop.retr(i+1) # This is also wrong.
print "Antal mails: %d\n" % self.mails
http://bertel.lundhansen.dk/ FIDUSO: http://fiduso.dk/
More information about the Python-list