Gary Wessle wrote:
> is there a way to make an assignment in the condition of "if"
No.
> nx = re.compile('regex')
> if x = nx.search(text):
>funCall(text, x))
Use:
nx = re.compile('regex')
x = nx.search(text)
if x:
funCall(text, x)
--
B
ISO C99 (ISO/IEC 9899:1999). See
the manuals of some implementers who tabulate these special values:
http://developer.apple.com/documentation/Darwin/Reference/ManPages/man3/atan2.3.html
http://www.ugcs.caltech.edu/manuals/libs/mpfr-2.2.0/mpfr_22.html
--
Ben Caradoc-Davies <[EMAIL PROTECTED]&
do not use these tools?
pychecker complains a lot when used on code that is poorly written and
includes bad practices such as using builtin function names as local
variable names. I consider pychecker's complaints in these cases to be a
*feature*.
--
Ben Caradoc-Davies <[EMAIL PROTECTED]&
are silently
unsetting the MAP_SHARED bit and not setting the MAP_PRIVATE bit. Linux
wants to know which you want.
With Python 2.4 on Linux 2.6, both work:
from mmap import mmap, MAP_ANONYMOUS, MAP_SHARED, MAP_PRIVATE
m1 = mmap(-1, 1024, MAP_ANONYMOUS|MAP_PRIVATE) # no error
m2 = mmap(-1, 1024, MA
James Stroud wrote:
> except URLError, HTTPException:
Aieee! This catches only URLError and binds the name HTTPException to
the detail of that error. You must write
except (URLError, HTTPException):
to catch both.
--
Ben Caradoc-Davies <[EMAIL PROTECTED]>
http://wintersun.org/
&
ndingBox line in the EPS file. The importing application
should honour this when determining the limits ofthe figure. See
http://www.cs.indiana.edu/docproject/programming/postscript/eps.html
and Google for more.
%%BoundingBox coordinates are integers and are in points.
--
Ben Carad
so make a format with (for example)
">"+"f"*n, and struct.unpack will return a tuple of length n.
For large volumes of data, the array module may be more useful (as
someone else has already noted).
--
Ben Caradoc-Davies <[EMAIL PROTECTED]>
http://wintersun.org/
&