Useful RE patterns (was: Variable Interpolation - status of PEP 215)

Mike C. Fletcher mcfletch at rogers.com
Tue Jul 2 15:45:30 EDT 2002


Mike C. Fletcher wrote:
...
 >     Irrational numbers (under numbers, i or j forms)

Obviously that should have been complex numbers, though it might be nice 
to have support for:

	Irrational Numbers: pi, e, any others of note? (allow 2pi, 2.5pi, (3/2) 
pi, pi*3, but not pi3 or pi4 etceteras) := (expression)?,pi

(though it doesn't seem spectacularly difficult to create with any 
grammar anyway) as well as:

	Complex numbers: (under numbers, i or j forms)

Which, I suppose, are almost the same basic structure, call it 
"mathematical numeric units" or something (i.e. act like a unit in that 
they don't need explicit * signs, but have a mathematical value when 
used alone)... anyway...

Enjoy,
Mike






More information about the Python-list mailing list