Re: [Tutor] classes and the deepcopy function

2008-01-05 Thread Alan Gauld
"Michael" <[EMAIL PROTECTED]> wrote > Is it normal practice to declare your variables in a class? I notice > that you don't have to, you can create them as you go, but i thought > declaring and initialising them in the class would make it easier to > understand and see what the class is for and s

Re: [Tutor] Program review

2008-01-05 Thread Ricardo Aráoz
Thanks everyone for your feedback. I'll correct the code and re-post it. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] classes and the deepcopy function

2008-01-05 Thread bob gailer
Michael wrote: > Hi Michael > > Thanks for the quick reply, I think I get it. So becuase I did not > declare them withing the init method using self they are shared by every > object that is created, even completely brand new ones? > > Is it normal practice to declare your variables in a class? I

Re: [Tutor] Program review

2008-01-05 Thread Ricardo Aráoz
Ok, here is a corrected new version, I hope. Kent, the fact that Mensaje.__init__ reads the message configuration is by design (it's a feature, not a bug ;c) ). The class is meant to be instantiated for using only once and with only one configuration and one message so including the configuration

[Tutor] Create popup image

2008-01-05 Thread Alvin Tan
hi all, I am doing a project, something like friend finder. for example , mobile 1 request the location of mobile 2, then a map will actually display on mobile 1 to show the location of mobile 2. But how can i have the popup image? Alvin ___

Re: [Tutor] Program review

2008-01-05 Thread Kent Johnson
Ricardo Aráoz wrote: > Ok, here is a corrected new version, I hope. > > Kent, the fact that Mensaje.__init__ reads the message configuration is > by design (it's a feature, not a bug ;c) ). You misunderstood my suggestion. I would add a method to Mensaje that creates the email.MIMEMultipart.MIME

Re: [Tutor] Program review

2008-01-05 Thread Ricardo Aráoz
Kent Johnson wrote: > Ricardo Aráoz wrote: >> Ok, here is a corrected new version, I hope. >> >> Kent, the fact that Mensaje.__init__ reads the message configuration is >> by design (it's a feature, not a bug ;c) ). > > You misunderstood my suggestion. I would add a method to Mensaje that > creat

Re: [Tutor] Program review

2008-01-05 Thread Jeff Johnson
I would like to "butt" in here and mention that this is some of the most useful information I have seen! I am a programmer of 25 years that is new to Python. This type of back and forth dialog on actual production code is extremely useful to learning the language. I have done this with Ed Le

Re: [Tutor] Create popup image

2008-01-05 Thread Alan Gauld
"Alvin Tan" <[EMAIL PROTECTED]> wrote > I am doing a project, something like friend finder. Sorry, I don't now it... > for example , mobile 1 request the location of > mobile 2, then a map will actually display on > mobile 1 to show the location of mobile 2. > But how can i have the popup

Re: [Tutor] Program review

2008-01-05 Thread Jeff Younker
The procesar function is complicated. It tries to do several things that that are better done elsewhere. It needs to be broken up into several functions and methods. This also clarifies and isolates the exception handling. > def procesar(mensaje): >try : The enclosing try block isn't need

[Tutor] [tutor] Pil image related question -- resending message without attachments

2008-01-05 Thread Varsha Purohit
Hello All, I am actually working on a project which deals with image processing. I just used pil function to resize the image into the dimensions i want. i was able to resize the image but the clarity of the new image is not good. Can anyone suggest which other functions i should use to impro