Deformed Form

Stephen Hansen me+list/python at ixokai.io
Sat Jun 12 13:58:44 EDT 2010


On 6/12/10 9:01 AM, Victor Subervi wrote:
>> You're doing something that you're not telling us. There's something
>> else going on. There's no way that form.getfirst() being in another file
>> will in and of itself (notwithstanding possibilities of the second
>> invocation actually not working at all due to reading the input) return
>> different results.
>>
> 
> I'm not hiding aces up my sleeve to make you all lose sleep.Honestly.

I don't think you are *on purpose*, I've been there, we all have. We did
something in some other file, or some other part of the file that
doesn't seem relevant, and it has an interaction we didn't predict, and
it isn't immediately obvious. Now we're on over here, somewhere entirely
else, and things are behaving oddly.

The only suggestion I have is: try dumping all the .pyc's.

Its extremely rare, but once in awhile, I've seen odd behavior due to
Python not thinking a certain one is updated or not. Shouldn't ever
happen (an updated .py should invalidate the .pyc and cause the .pyc to
be regen'd), but it has to me like twice. (Ever)


> Yeah, well with copy and paste, the middle of the road might not be that far
> from "absurdly long variables". :) What's lost with long vars? Nothing but
> typing time, really. Short vars that aren't descriptive are problematic for
> far greater reasons.

Yes, but its not either/or, at all. There is "long names", and then
there is "short names": then there is a much wider gulf between, names
that are neither "long" nor "short".

I'm not sure what you're talking about with regards to copy and paste.

But, what's lost with "absurdly long names"? The clarity of the
resulting code. Names that are in the middle; long enough to be
descriptive and clear, but not needlessly verbose, lead to clarity of
the structure, certainly. Short names that are obscure abbreviations
hurt the clarity of the structure, absolutely.

However, once names get too verbose and long, you get into a situation
where their use in any sort of expression suddenly makes it so you get
obscenely long lines or need to start splitting that expression into
multiple lines.

Not that multiple lines *has* to be bad: but when something can be said
succinctly and clearly on one, Baby Jeebus is happy. And when something
can be said on a line that's not over oh, 80-100 (depending a lot on how
Old School you are :)) characters wide, yet still clear and entirely
comprehensible, Baby Jeebus is very happy. Even in the era of really
wide monitors: the virtue of the narrower code is side-by-side
comparison and evaluation (and less 'omg, my terminal is only 80
characters wide!' anymore).

-- 

   Stephen Hansen
   ... Also: Ixokai
   ... Mail: me+list/python (AT) ixokai (DOT) io
   ... Blog: http://meh.ixokai.io/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 487 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-list/attachments/20100612/421974ef/attachment.sig>


More information about the Python-list mailing list