Re: Why doesn't "filterwarnings" suppress this message?

2010-01-29 Thread John Nagle
It turned out to be a loading order issue. That message is generated at import time, and "filterwarnings" hadn't been called yet. John Nagle Peter Otten wrote: John Nagle wrote: Feedparser isn't supported for Python 3.0, so

Re: mix statically typed with dynamically typed

2010-01-29 Thread John Nagle
ed down at compile time. (Plus, of course, something so that multithreaded programs don't suck so bad on multicore CPUs.) John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Threading issue with SQLite

2010-01-30 Thread John Nagle
ore serious database. Especially if you're doing much updating. SQLite can do multiple SELECT operations in parallel, but the entire database is locked for all operations that write. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Plugins for a Python program

2009-09-26 Thread John Nagle
thin your running program. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: unexplainable python

2009-09-26 Thread John Nagle
dads wrote: Sorry forgot to mention I'm using python 2.6 This looks like a homework assignment. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a method (similar to str() method in R) that can print the data structure in python?

2009-09-27 Thread John Nagle
ncates sequences silently, which may or may not be what you want. -[]z. Ah, introspection. Is that a defined feature of Python or an implementation quirk of CPython? John Nagle -- http://mail.python.org/mailman/listinfo/python-list

M2Crypto 0.20.1 won't build on Red Hat Linux

2009-09-30 Thread John Nagle
new SSL support, but MySQLdb doesn't support Python 2.6, so I can't convert yet.) John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: M2Crypto 0.20.1 won't build on Red Hat Linux

2009-10-01 Thread John Nagle
Heikki Toivonen wrote: John Nagle wrote: M2Crypto, from http://pypi.python.org/packages/source/M/M2Crypto/M2Crypto-0.20.1.tar.gz won't build on Red Hat Linux / 386. The error is It's some incompatibility between Red Hat include file packaging and M2Crypto. Yup, all Fedora

Re: Pyserial non-standard baud rate

2009-10-01 Thread John Nagle
n can process just fine. Printing kanjii in a terminal window is troublesome on some operating systems. But it's possible to get everything working in Unicode, which will result in kanjii text appearing. Reading the Japanese may be a problem, although you can put the text through Google

Re: M2Crypto 0.20.1 won't build on Red Hat Linux

2009-10-02 Thread John Nagle
Heikki Toivonen wrote: John Nagle wrote: The right question is "uname --hardware-platform". That returns "i386" if running on something emulating a 386, even it it's 64-bit capable. Thanks, I'll make a note that I'll need to clarify that part. With that c

Re: Dictionary with Lists

2009-10-03 Thread John Nagle
used in a dictionary. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: A new Internet-search website written in Python

2009-10-09 Thread John Nagle
? John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: python performance on Solaris

2009-10-14 Thread John Nagle
eaded compute-bound Python programs really suck on multiprocessors. Adding a second CPU makes the program go slower, due to a lame mechanism for resolving conflicts over the global interpreter lock. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Cpython optimization

2009-10-21 Thread John Nagle
t, while you don't have to declare types, each variable generally has to stay the same type throughout its life. (Different subclasses of the same class are OK.) This is enough to make huge speedups possible. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: PySerial

2009-10-24 Thread John Nagle
ine with a COM3 port? John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Web development with Python 3.1

2009-10-28 Thread John Nagle
libraries (you call them) over "frameworks" (they call you) if you're doing something unusual. Frameworks are more useful if you're doing yet another "Web 2.0" web site. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Web development with Python 3.1

2009-10-28 Thread John Nagle
Diez B. Roggisch wrote: John Nagle schrieb: Alan Harris-Reid wrote: I am very much new to Python, and one of my first projects is a simple data-based website. I am starting with Python 3.1 Until MySQLdb gets ported to something later than Python 2.5, support for a "data-based web

Re: OT: DARPA red balloon challenge

2009-10-31 Thread John Nagle
l They image the whole planet at 0.42m resolution in color every two days. Upload that to some cloud system and find all red dots in the continental US that weren't there before the event. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Cancelling a python thread (revisited...)

2009-11-07 Thread John Nagle
is used, and the thread waiting on "fd" is not the main thread, will a signal cause the waiting thread to get a read completion? Or is this another "first thread only" thing"? John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Cancelling a python thread (revisited...)

2009-11-08 Thread John Nagle
ectively thread cancellation. So right now, you can kill the first thread from another thread. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

pyserial vs. Linux power save hibernate/resume - program hangs

2009-11-08 Thread John Nagle
erial port produces an IOError exception, but the read side doesn't seem to notice. Any ideas? John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Cancelling a python thread (revisited...)

2009-11-09 Thread John Nagle
Antoine Pitrou wrote: John Nagle animats.com> writes: I'd argue against general thread cancellation. Inter-thread signals, though, have safety problems no worse than the first-thread only signals we have now. You're allowed to raise an exception in a signal handler, which i

Re: CGI vs mod_python

2009-11-10 Thread John Nagle
sure the environment works - Python loads, the Python program loads, and you can get a response back. Bear in mind that most hosting services don't make much of an attempt to support Python. Expect important libraries to be missing or obsolete.

Re: Python & Go

2009-11-14 Thread John Nagle
hanism is simple enough. In a static language, you can convert "duck typing" to inheritance at link time, when you have the chance to see what can match what. So the implementation doesn't actually have to search for a match at run time. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: python simply not scaleable enough for google?

2009-11-14 Thread John Nagle
structure and form have usually been fully determined by the time the program begins execution. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: python simply not scaleable enough for google?

2009-11-15 Thread John Nagle
if the machinery for dynamic attributes needs to be provided for that class. This allows the "slots" optimization, and direct compilation into struct-type code. Python is a very clean language held back from widespread use by slow implementations. If Python ran faster, Go would be unnecessary. And yes, performance matters when you buy servers in bulk. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: mySQL access speed

2009-11-16 Thread John Nagle
LOAD command. That's far faster than doing vast numbers of INSERT operations. The LOAD command loads all the data, unindexed, then builds the indices. Expect a 10x speed improvement or better. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Using "setup.py" for an application, not a library module.

2009-11-18 Thread John Nagle
x27;, description="Baudot Teletype RSS and SMS program", version='1.0', author="John Nagle", author_email="na...@animats.com", packages=['messager'], requires=['pyserial', 'feedparser'] ) John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Does Python 3.x support Unicode-named attributes?

2009-11-20 Thread John Nagle
his error today: urllib.py:1197: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal res = map(safe_map.__getitem__, s) John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Inserting Unicode text with MySQLdb in Python 2.4-2.5?

2009-11-20 Thread John Nagle
I suggest ALTER DATABASE dbname DEFAULT CHARACTER SET utf8; before doing any CREATE TABLE operations. Then strings will be UTF8 in the database. Read this: http://dev.mysql.com/doc/refman/5.0/en/charset-unicode.html It all works quite well. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

CentOS 5.3 vs. Python 2.5

2009-11-24 Thread John Nagle
25-rpms-for-rhel-5-centos-5/ Google Translate gives me "[...] On this entry uses the src.rpm. Kitara dropped, rpmbuild-rebuild (rpm-rebuild, but often seen the entry, it says, there's this option only old rpm) [...]" I'm trying to figure that out.

Overcoming python performance penalty for multicore CPU

2010-02-02 Thread John Nagle
gic. Has anyone tried using "affinity" ("http://pypi.python.org/pypi/affinity";) to lock each Python process to a single CPU? Does that help? John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Overcoming python performance penalty for multicore CPU

2010-02-03 Thread John Nagle
Paul Rubin wrote: John Nagle writes: Analysis of each domain is performed in a separate process, but each process uses multiple threads to read process several web pages simultaneously. Some of the threads go compute-bound for a second or two at a time as they parse web pages. You&#x

Re: Overcoming python performance penalty for multicore CPU

2010-02-03 Thread John Nagle
Steve Holden wrote: John Nagle wrote: Paul Rubin wrote: John Nagle writes: Analysis of each domain is performed in a separate process, but each process uses multiple threads to read process several web pages simultaneously. Some of the threads go compute-bound for a second or two at a

Re: Common area of circles

2010-02-04 Thread John Nagle
I used to do stuff like this back when I did physics engines with efficient 3D collision detection.) John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: How to guard against bugs like this one?

2010-02-05 Thread John Nagle
make module search return an error if two modules satisfy the search criteria. "First find" isn't a good solution. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: intolerant HTML parser

2010-02-06 Thread John Nagle
"datavars": {"charAsInt": charAsInt}}) Every time through the loop (once per character), they build that frozen set again. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Google AI Challenge at U of Waterloo

2010-02-06 Thread John Nagle
Forthminder wrote: ... Ignore. Well-known nut. See "http://www.nothingisreal.com/mentifex_faq.html"; John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Need debugging knowhow for my creeping Unicodephobia

2010-02-12 Thread John Nagle
modern Windows and Linux systems support Unicode consoles, but Python somehow doesn't get this.) John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Need debugging knowhow for my creeping Unicodephobia

2010-02-12 Thread John Nagle
ou're using IDLE, or some Python debugger, it may need to be told to have its window use Unicode. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

The future of "frozen" types as the number of CPU cores increases

2010-02-16 Thread John Nagle
This approach makes threading much easier for the typical programmer. Instead of race conditions and random errors, you get error messages. And we get rid of the GIL. I look at this as Python's answer to multicore CPUs and "Go". John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: The future of "frozen" types as the number of CPU cores increases

2010-02-16 Thread John Nagle
Terry Reedy wrote: On 2/16/2010 3:15 PM, John Nagle wrote: In the beginning, Python had some types which were "frozen", > and some which weren't. In the beginning, there was only one 'frozen' general purpose collection type, the tuple. And Guido resisted the sug

Re: The future of "frozen" types as the number of CPU cores increases

2010-02-17 Thread John Nagle
Daniel Stutzbach wrote: On Tue, Feb 16, 2010 at 3:15 PM, John Nagle wrote: One possible implementation would be to have unfrozen objects managed by reference counting and locking as in CPython. Frozen objects would live in a different memory space and be garbage collected by a concurrent

Re: The future of "frozen" types as the number of CPU cores increases

2010-02-18 Thread John Nagle
John Nagle wrote: I look at this as Python's answer to multicore CPUs and "Go". On that note, I went to a talk at Stanford yesterday by one of the designers of Intel's Nelahem core. The four-core, eight thread version is out now. The six-core, twelve thread ver

Re: The future of "frozen" types as the number of CPU cores increases

2010-02-20 Thread John Nagle
sjdevn...@yahoo.com wrote: On Feb 18, 2:58 pm, John Nagle wrote: Multiple processes are not the answer. That means loading multiple copies of the same code into different areas of memory. The cache miss rate goes up accordingly. A decent OS will use copy-on-write with forked processes

Re: with statement and standard library

2010-02-21 Thread John Nagle
t if release is just resource recovery. Reference counting will recover most objects when they go out of scope anyway. Don't get carried away just because a new feature is available. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: The future of "frozen" types as the number of CPU cores increases

2010-02-22 Thread John Nagle
sjdevn...@yahoo.com wrote: On Feb 20, 9:58 pm, John Nagle wrote: sjdevn...@yahoo.com wrote: On Feb 18, 2:58 pm, John Nagle wrote: Multiple processes are not the answer. That means loading multiple copies of the same code into different areas of memory. The cache miss rate goes up

Re: The future of "frozen" types as the number of CPU cores increases

2010-02-23 Thread John Nagle
mk wrote: sjdevn...@yahoo.com wrote: On Feb 20, 9:58 pm, John Nagle wrote: sjdevn...@yahoo.com wrote: On Feb 18, 2:58 pm, John Nagle wrote: Multiple processes are not the answer. That means loading multiple copies of the same code into different areas of memory. The cache miss rate

Re: When will Java go mainstream like Python?

2010-02-26 Thread John Nagle
#x27;s restrictions are inherently necessary. The one Shed Skin developer has accomplished far more than the PyPy army of ants. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Draft PEP on RSON configuration file format

2010-02-28 Thread John Nagle
ually. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Working group for Python CPAN-equivalence?

2010-03-03 Thread John Nagle
s quality control, with testers and a test reporting system. PyPi does not. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: NoSQL Movement?

2010-03-04 Thread John Nagle
databases have to be carefully organized to avoid excessive cross-machine locking. If you don't need general joins, a system which doesn't support them is far simpler. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Are there in Python some static web site generating tools like webgen, nanoc or webby in Ruby ?

2010-03-14 Thread John Nagle
ut they have more baggage. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Understanding the CPython dict implementation

2010-03-14 Thread John Nagle
? John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Converting Python CGI to WSGI scripts

2010-03-16 Thread John Nagle
at program load time, rather than when the main function is called, may give trouble. Also, be careful about leaving files, database connections, and sockets open after the main function returns. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: sqlite3, memory db and multithreading

2010-03-18 Thread John Nagle
transaction volumes much better than sqlite. You use sqlite for configuration files, your personal databases, and other small stuff. You run your Web 2.0 site on MySQL or Postgres. You run your Fortune 1000 company on Oracle. John Nagle -- http://mail.py

Re: Unicode blues in Python3

2010-03-24 Thread John Nagle
ters. OK. Then you need to be writing arrays of bytes, not strings. Encoding is your problem. This has nothing to do with Unicode. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there any library for indexing binary data?

2010-03-25 Thread John Nagle
甜瓜 wrote: > Well, Database is not proper because 1. the table is very big (~10^9 > rows) 2. we should support very fast *simple* query that is to get > value corresponding to single key (~10^7 queries / second). Ah, crypto rainbow tables. J

Re: "Usability, the Soul of Python"

2010-03-29 Thread John Nagle
ype on a light brown background. One could write a good paper on this topic, but this isn't it. By the same author: "The Case For Uncreative Web Design", which has no examples. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: I'm looking for html cleaner. Example : convert my title => < h1>my title…

2010-03-29 Thread John Nagle
Then regenerate HTML from the tree. Or just use HTML Tidy: "http://www.w3.org/People/Raggett/tidy/"; John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: (a==b) ? 'Yes' : 'No'

2010-03-30 Thread John Nagle
legant/common python expression for this? Yes, Python has ternary operator-like syntax: return ('Yes' if a==b else 'No') Note that this requires a recent version of Python. Who let the dogs in? That's awful syntax. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Binary Decimals in Python

2010-03-30 Thread John Nagle
representations, due to rounding problems. Long discussion of this here: "http://bugs.python.org/issue1580"; John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: How many packages there are in PyPI

2010-03-30 Thread John Nagle
are dead. I just tried "Dejavu", which only has a link to "projects.amor.org". That subdomain is dead. "amor.org" is some kind of religious organization. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: "Usability, the Soul of Python"

2010-03-31 Thread John Nagle
Alf P. Steinbach wrote: * Jean-Michel Pichavant: John Nagle wrote: Jonathan Hayward wrote: I've posted "Usability, the Soul of Python: An Introduction to the Python Programming Language Through the Eyes of Usability", at: http://JonathansCorner.com/python/ No, it&

Re: folks, what's wrong with this?

2010-04-02 Thread John Nagle
mes. So don't do that. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Some syntactic sugar proposals

2010-11-15 Thread John Nagle
abc'] which is almost as short as obj.abc but safer. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting references to objects without incrementing reference counters

2010-11-15 Thread John Nagle
y leak. Did that get fixed? John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: What was your strategy?

2010-11-15 Thread John Nagle
It doesn't have the storage management problems of C and C++, the awful syntax of Perl, the object-as-copy semantics of Javascript, or the mess of stacked libraries of Java. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Is Unladen Swallow dead?

2010-11-16 Thread John Nagle
stion." So Google has pulled the plug on Unladen Swallow. It looks like they underestimated the difficulty of speeding up the CPython model. The performance improvement achieved was so low that cluttering up CPython with a JIT system and LLVM probably is a lose.

Re: How can I catch segmentation fault in python?

2010-11-16 Thread John Nagle
se for segmentation fault. Either fix the program so it doesn't crash,or run the offending module and the C code in a subprocess. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Is Unladen Swallow dead?

2010-11-17 Thread John Nagle
ut of the cage and thumps its head on the counter. Throws it up in the air and watches it plummet to the floor.) Mr. Praline: Now that's what I call a dead parrot. (There's more, but you get the idea.) John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Is Unladen Swallow dead?

2010-11-18 Thread John Nagle
On 11/18/2010 4:24 AM, BartC wrote: "John Nagle" wrote in message news:4ce37e01$0$1666$742ec...@news.sonic.net... On 11/16/2010 10:24 PM, swapnil wrote: AFAIK, the merging plan was approved by Guido early this year. I guess Google is expecting the community to drive the project fr

Re: Is Unladen Swallow dead?

2010-11-18 Thread John Nagle
On 11/18/2010 5:35 PM, Mark Wooding wrote: John Nagle writes: Python is defined by what a naive interpreter with late binding and dynamic name lookups, like CPython, can easily implement. Simply emulating the semantics of CPython with generated code doesn't help all that much. I

Re: Pickling a database cursor?

2010-11-21 Thread John Nagle
e cookies for position information. The browser's "Back" button won't do what users expect if you do that. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Needed: Real-world examples for Python's Cooperative Multiple Inheritance

2010-11-25 Thread John Nagle
multiple inheritance might not even be aware that there's a clash further up in the hierarchy. This is one of those areas where all the code looks right locally, but it's wrong globally. Best practice for this is "don't do it." Some name clashes ought to simply be detect

Re: Needed: Real-world examples for Python's Cooperative Multiple Inheritance

2010-11-26 Thread John Nagle
On 11/25/2010 5:36 PM, Raymond Hettinger wrote: On Nov 25, 3:38 pm, John Nagle wrote: Best practice for this is "don't do it." Some name clashes ought to simply be detected as errors, rather than being given such complex semantics. That may well be true. If a coder has

Re: inverse of a matrix with Fraction entries

2010-11-26 Thread John Nagle
True" or a counterexample. The algorithm uses the simplex method from linear programming, but with rational arithmetic. But that's an exotic application. For ordinary number crunching, rational arithmetic is completely inappropriate. John Nagle -- http

Re: Needed: Real-world examples for Python's Cooperative Multiple Inheritance

2010-11-26 Thread John Nagle
On 11/26/2010 4:21 PM, Mark Wooding wrote: John Nagle writes: I'd argue that a better implementation would require that when there's a name clash, you have to specify the class containing the name. In other words, if A is a subclass of B, then B.foo() overrides A.foo(). But

Getting current time zone in Python in tzinfo format not implemented

2010-11-28 Thread John Nagle
seful ever get done about that? This ought to be in the "time" module for each platform. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Comparison with False - something I don't understand

2010-12-02 Thread John Nagle
e of the issues that came up. Defining addition in a way that is not associative and commutative leads to problems, and breaks generic algorithms. If the basic operators follow the expected rules, generic algorithms will work on them. That was botched in Python. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: To Thread or not to Thread....?

2010-12-02 Thread John Nagle
h the accelerometer data and video frames are buffered, then you can do your processing in Python without trying to meet hard real-time constraints. This is the usual approach in Windows land. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: three column dataset - additions and deletions

2010-12-02 Thread John Nagle
ly not the right approach. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Which non SQL Database ?

2010-12-05 Thread John Nagle
uot; databases for very large distributed systems. You worry about this if you're Facebook or Google, or are running a big game server farm. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Comparison with False - something I don't understand

2010-12-06 Thread John Nagle
hack from the PDP-11 era. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Resumable exceptions bad: (was Re: Comparison with False - something I don't understand)

2010-12-06 Thread John Nagle
ce had to handle floating point overflow, which indicated that the computation had to be backed up and rerun with a smaller time step. It's possible to do this safely under Windows on x86 if you read all the appropriate documents. It's not portable. That's why I'm a

Re: Exception handling in Python 3.x

2010-12-06 Thread John Nagle
t worst. Right. You're not entitled to assume that StopIteration is how a generator exits. That's a CPyton thing; generators were a retrofit, and that's how they were hacked in. Other implementations may do generators differently. John Nagl

Re: Exception handling in Python 3.x

2010-12-06 Thread John Nagle
On 12/6/2010 2:24 PM, Mark Wooding wrote: John Nagle writes: Right. You're not entitled to assume that StopIteration is how a generator exits. That's a CPyton thing; generators were a retrofit, and that's how they were hacked in. Other implementations may do generators diff

Re: Exception handling in Python 3.x

2010-12-06 Thread John Nagle
model well. This held the language back and eventually killed it.) C I/O returned a unique value on EOF, but there was no way to test for it before reading. Works much better. The same issues apply to pipes, sockets, qeueues, interprocess communication, etc.

Re: Collision of rotated rectangles without pygame

2010-12-07 Thread John Nagle
aster. Realistically, though, this is the kind of problem that runs slow in CPython. This is why you don't write your own collision library. (I once did, for 3D, but that was in 1996, when it was cutting-edge technology.) John Nagle -- http://mail.python.o

Re: Comparisons of incompatible types

2010-12-07 Thread John Nagle
nd (not b) not (not a) == a should all hold, or an type exception should be raised. With Python accepting both "True" and "1" as sort of equivalent, there are cases where those don't hold. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Comparisons of incompatible types

2010-12-08 Thread John Nagle
ts, because incorrect branches would be taken and the final bogus results might not contain NaNs. I personally think that comparing NaN with numbers or other NaNs should raise an exception. There's no valid result for such comparisons. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Comparisons of incompatible types

2010-12-08 Thread John Nagle
definition of comparison associated with the object, you probably can't order it properly, either. "<" can't be some random function. For sorting to work, a < b and b < c implies a < c must hold. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Comparisons of incompatible types

2010-12-08 Thread John Nagle
On 12/8/2010 7:56 PM, geremy condra wrote: On Wed, Dec 8, 2010 at 1:01 PM, John Nagle wrote: On 12/7/2010 3:59 PM, Mark Wooding wrote: Exactly one of a > b a = b a < b is true, or an type exception must be raised. Here's an example where this iss

Re: 64 bit memory usage

2010-12-09 Thread John Nagle
32 bit machines with more than 4GB of RAM. None of the real 64-bit architectures, from AMD64 to SPARC to Itanium, need this hack. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Comparisons of incompatible types

2010-12-09 Thread John Nagle
On 12/9/2010 12:36 AM, Terry Reedy wrote: On 12/9/2010 2:58 AM, Steven D'Aprano wrote: On Wed, 08 Dec 2010 20:16:57 -0800, John Nagle wrote: I believe that is that exactly one of <,=.> are true. Not for NaNs. >>> NaN = float('nan') >>> NaN == NaN

Re: 64 bit memory usage

2010-12-09 Thread John Nagle
ppropriate, and will scale to terabytes if necessary. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Python critique

2010-12-10 Thread John Nagle
Interestingly, some of the motivation for "functional programming" in Python, with lambdas and list comprehensions, is to get a very local scope for a very local variable. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Python critique

2010-12-10 Thread John Nagle
scope. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Proposed changes to logging defaults

2010-12-15 Thread John Nagle
in subtle ways. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Links and pointers to basics of soap and suds

2010-12-15 Thread John Nagle
nd back not-too-strict XML or JSON. This is called a "REST" interface. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

<    4   5   6   7   8   9   10   11   12   13   >