Does Python really follow its philosophy of "Readability counts"?

r rt8396 at gmail.com
Sun Jan 11 19:37:09 EST 2009


On Jan 11, 6:00 pm, Roy Smith <r... at panix.com> wrote:
> In article
> <34c95e04-5b3f-44bc-a5bf-498518507... at p36g2000prp.googlegroups.com>,
>
>  "Madhusudan.C.S" <madhusuda... at gmail.com> wrote:
> > In such situations, where the Instance variables come into existence
> > only when they are used it is very difficult to track the flow of code.
>
> As the saying goes, "It's possible to write Fortran in any language".
>
> My personal habit is to "declare" all instance variables in the __init__()
> method of every class.  If there's no better value, I set them to None.  
> This isn't strictly required, but I think it makes it easier for somebody
> reading the code to understand the class.
>
> I'm not a big fan of dogmatic rules, other than the rule that says you
> should make your code as easy for somebody else to understand as possible.

Roy i totally agree and as i read down this thread i was thinking i
might get to spit that out first but you beat me -- Darn!

PS: your explanation is also much more eloquent than mine would have
been  :)



More information about the Python-list mailing list