Re: [Tutor] Accessing class attributes: use methods only?

2007-02-19 Thread Chris Lasher
Thanks very much for your responses, all. Just to clarify, yes, by through class methods I actually meant through methods of instances of a class. Now for more discussion: I'm confused. On the one hand we have Mr. Kent Johnson's statement: On 2/13/07, Kent Johnson [EMAIL PROTECTED] wrote:

Re: [Tutor] Accessing class attributes: use methods only?

2007-02-19 Thread Chris Lasher
Ah ha! All is clear, now. I understand what I misinterpreted in your first post, Alan. Thanks also to Lloyd for reinforcing the concept. Much appreciated! Chris ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Accessing class attributes: use methods only?

2007-02-13 Thread Chris Lasher
Is it general good practice to access and set class attributes via methods only, or is it okay practice to directly interact with class attributes? The professor in a class on Perl that I'm taking suggested that directly accessing and setting class attributes was a bad idea. Just wondering what

Re: [Tutor] What is a mixin class?

2007-01-17 Thread Chris Lasher
On 1/17/07, Don Taylor [EMAIL PROTECTED] wrote: So, what constitutes a mixin class and what are the conventional ways to denote them in code? A mixin is a specific type of superclass, just called a mixin because of the concept it represents. A common type of mixin would be a class that defines

Re: [Tutor] OT: Vim was: free IDE for Python?

2006-11-18 Thread Chris Lasher
On 11/17/06, Mike Hansen [EMAIL PROTECTED] wrote: Here's what I'm doing. Not sure if it's that helpful to you. I use the mini-buffer explorer plug-in and the taglist plugin. set smartindent shuts off the annoying # comment in smartindent to jump to col 1 inoremap # Xc-h# autocmd

[Tutor] Equivalent to perl -e

2006-10-15 Thread Chris Lasher
My professor and advisor has been inspired by me to give Python a try. He's an avid Perl user, and challenged me with the following: What is the Python equivalent to perl -e 'some oneliner'? Embarassingly, I had no answer, but I figure, someone on the list will know. His use of Python is at

Re: [Tutor] Equivalent to perl -e

2006-10-15 Thread Chris Lasher
Haha! I'll relay that message! Thanks Kent and Glenn! Chris On 10/15/06, Glenn T Norton [EMAIL PROTECTED] wrote: Chris Lasher wrote: My professor and advisor has been inspired by me to give Python a try. He's an avid Perl user, and challenged me with the following: What is the Python

Re: [Tutor] Equivalent to perl -e

2006-10-15 Thread Chris Lasher
to experience Python he will come to understand why it's not suited for one-liners, and why that's a Good Thing. Excellent reply! Chris On 10/15/06, Tim Peters [EMAIL PROTECTED] wrote: [Chris Lasher] My professor and advisor has been inspired by me to give Python a try. He's an avid Perl