New submission from David M. Cooke:
The following segfaults:
class A(int):
def __repr__(self):
raise Exception()
a = A()
d = {a : 1}
repr(d)
This is with Python 3.3.0, running on Mac OS 10.7.5, from MacPorts:
Python 3.3.0 (default, Sep 29 2012, 08:16:08)
[GCC 4.2.1 Compatible
html5lib has several implementations for several languages, it
may actually be worth it to generate lexers for each language from one
specification file.
Take care,
David M. Cooke david.m.co...@gmail.com
--
http://mail.python.org/mailman/listinfo/python-list
failing condition, for instance.
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman/listinfo/python-list
)
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] (David M. Cooke) writes:
Bruno's already mentioned that iterators and generators aren't
sequences. Numpy arrays act like the other sequence types:
a = numpy.array([])
a
array([], dtype=int64)
len(a)
0
bool(a)
False
(0-dimensional numpy arrays are pathological anyways
the latest setuptools (0.6b1). The hacks
I added to get easy_install and numpy.distutils to get along are hard
enough without trying to be backward compatible :-(
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster
.
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman/listinfo/python-list
.
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman/listinfo/python-list
setup.py build python setup.py install.
Do you need Tiger (10.4) or Panther (10.3) compatibility?
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman/listinfo/python-list
/pyPdf/. I haven't tried it,
but it looks interesting.
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman/listinfo/python-list
C code, but it does the
job well.
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman/listinfo/python-list
*(a8 + x2*a10
(or least that's what I like to write). Now, if I were going to higher
precision, I'd have more digits of course.
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http
.
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman/listinfo/python-list
there :)
For modules, sys.modules is a dictionary of the modules that have been
imported.
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman/listinfo/python-list
to it).
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman/listinfo/python-list
Robert Kern [EMAIL PROTECTED] writes:
greg wrote:
David M. Cooke wrote:
To solve that, I would suggest a fourth category of arbitrary
ordering, but that's probably Py3k material.
We've got that: use hash().
[1+2j, 3+4j].sort(key=hash)
What about objects that are not hashable?
The purpose
, the order will stay the same.
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman/listinfo/python-list
be possible. I haven't had the time to
actually do anything, though :-)
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman/listinfo/python-list
.
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman/listinfo/python-list
).
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman/listinfo/python-list
where
timestamps w/ state changes are pushed on in thread 1, and popped
off and analysed before logging in thread 2. (Or something; this
just popped in my head.)
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster
.
--
||\/|
/--\
|David M. Cooke http://arbutus.physics.mcmaster.ca/dmc/
|[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
.
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman/listinfo/python-list
)
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman/listinfo/python-list
at it]
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman/listinfo/python-list
]
and that'll work.
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman/listinfo/python-list
:-)
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman/listinfo/python-list
classmethod, and the
datetime extension module use the C version (the METH_CLASS flag).
And staticmethod (and METH_STATIC) aren't used at all in 2.3 or 2.4 :-)
[if you ignore __new__]
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics
:-)
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman/listinfo/python-list
.
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman/listinfo/python-list
this:
import cgi
form = cgi.FieldStorage()
if form.getvalue('sort') == 'ascending':
... sort in ascending order ...
etc.
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org
def __getitem__(self, name):
return self.m.group(name)
Then, use it like
for line in fo:
m = Matcher(line)
if m.match(rx1):
do something
elif m.match(rx2):
do something
else:
error
--
||\/|
David M. Cooke
cookedm(at)physics(dot)mcmaster(dot)ca
!) is not
guaranteed to get all contiguous character data in one call. Also check
if .skippedEntity() methods are firing.
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman
doesn't name their plugin
'os; os.system(rm -rf /); import sys'
Use __import__ instead.
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman/listinfo/python-list
missing tabs (\t).
The GNU binutils string utility looks for \t or [\x20-\x7e].
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman/listinfo/python-list
what I believe the consensus is
about the usage of open vs. file.
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman/listinfo/python-list
.
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman/listinfo/python-list
, check that
import Numeric
Numeric.__file__
gives you something you're expecting, and not something else.
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman/listinfo/python
.
The tp_name slot of your extension type should be model.hyper.PeriodicGrid.
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman/listinfo/python-list
).
Have a look at the readline info page, or the man page. The syntax of
readline.parse_and_bind is the same as that of an inputrc file.
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http
:-)
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman/listinfo/python-list
with same date and time fields)},
It probably would help to add some documentation to add to the
datetime module documentation.
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org
, best of 3: 216 usec per loop
So factor of 2, instead of 13700 ...
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman/listinfo/python-list
is if getattr, when raising
AttributeError, somehow reused the old traceback (which would point
out the original problem). I don't know how to do that, though.
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot
in a module.
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman/listinfo/python-list
.
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman/listinfo/python-list
46 matches
Mail list logo