PEP 8 : Maximum line Length :

Roy Smith roy at panix.com
Sat May 17 09:49:58 EDT 2014


In article <mailman.10083.1400332708.18130.python-list at python.org>,
 Chris Angelico <rosuav at gmail.com> wrote:

> On Sat, May 17, 2014 at 10:52 PM, Albert van der Horst
> <albert at spenarnc.xs4all.nl> wrote:
> > That may be tong-in-cheek but mathematicians do exactly that. We
> > use roman, greek and hebrew alphabets in normal italics and boldface
> > and then some special characters for element-of, logical-or, integral signs,
> > triangles and what not. Underbarred and upper twiggled, as a suffix a prefix
> > or a superfix. All in the name of avoiding names longer than one character.
> >
> > When we run out then there are creative ways to combine known characters
> > into Jacobi symbols and choose functions.
> >
> > There are even conventions that allow to leave out characters, like
> > "juxtaposition means multiplication" and the Einstein summation convention.
> 
> This, I think, is the main reason for the one-character variable name
> convention. Why else are there subscripts? Instead of using "V0"
> (two-character name), you use "V?" (one-character name with a
> subscript tag on it) to avoid collision with multiplication.
> 
> > Now translate E=mc^2 into Java.
> 
> Dunno, but in Python it would be:
> 
> assert E==m*c*c
> 
> And would probably fail, because that's all floating point :)
> 
> ChrisA

Nah.  Python has relativistic duck typing:

>>> c = 186000
>>> m = 100
>>> E = 3459600000000L
>>> assert E==m*c*c
>>>



More information about the Python-list mailing list