Pychecker Re: Nested List Question

2005-11-02 Thread Roman Suzi
you observe is the only possible one. > > If you want copies instead, ASK for copies...: > > gridSystemId = [ [None]*columns for x in xrange(rows) ] Interesting, could not pychecker recognize such situations in Python code and give warnings? Sincerely yours, Roman Suzi -- [EM

Re: XML DOM: XML/XHTML inside a text node

2005-11-02 Thread Roman Suzi
rsing the input into XML first? Is there any point in including unescaped code into XML document unless it is XML itself? > Thanks. > > Sincerely yours, Roman Suzi -- [EMAIL PROTECTED] =\= My AI powered by GNU/Linux RedHat 7.3 -- http://mail.python.org/mailman/listinfo/python-list

Re: reading internet data to generate random numbers.

2005-11-02 Thread Roman Suzi
t;stream"? Then it is not original and I already saw answers with recomendations. Sincerely yours, Roman Suzi -- [EMAIL PROTECTED] =\= My AI powered by GNU/Linux RedHat 7.3 -- http://mail.python.org/mailman/listinfo/python-list

Re: Flat file, Python accessible database?

2005-11-02 Thread Roman Suzi
at is strange. SQLite + PySQLite are IMHO no harder to install than BerkeleyDB + Pybsddb... > On the other > hand, BerkeleyDB + Pybsddb worked like a charm, with no setting up (under > Cygwin). Sincerely yours, Roman Suzi -- [EMAIL PROTECTED] =\= My AI powered by GNU/Linux RedHat 7.3 --

Re: Bug in email package?

2005-02-21 Thread Roman Suzi
On Sun, 20 Feb 2005, Steven Bethard wrote: Erik Max Francis wrote: Roman Suzi wrote: I think that if any object (from standard library at least) doesn't support iteration, it should clearly state so. My guess is that 'for' causes the use of 'm[0]', which is (rightfull

Bug in email package?

2005-02-20 Thread Roman Suzi
to iterate over something useful in a message? P.S. rfc822 has the same behaviour, at least on Python 2.3 Sincerely yours, Roman Suzi -- [EMAIL PROTECTED] =\= My AI powered by GNU/Linux RedHat 7.3 -- http://mail.python.org/mailman/listinfo/python-list

Recursive __cmp__ in different Python versions

2005-02-14 Thread Roman Suzi
20+ times and then give up. Python1.5 gives segmentation fault... Sincerely yours, Roman Suzi -- [EMAIL PROTECTED] =\= My AI powered by GNU/Linux RedHat 7.3 -- http://mail.python.org/mailman/listinfo/python-list

Re: Is email package thread safe? (fwd)

2005-02-12 Thread Roman Suzi
On Thu, 10 Feb 2005, Antoon Pardon wrote: Op 2005-02-09, Roman Suzi schreef <[EMAIL PROTECTED]>: On Wed, 9 Feb 2005, Antoon Pardon wrote: Op 2005-02-09, Roman Suzi schreef <[EMAIL PROTECTED]>: Just to be sure, is email package of Python 2.3 thread-safe or not (to use, for example, in p

Re: Is email package thread safe? (fwd)

2005-02-09 Thread Roman Suzi
On Wed, 9 Feb 2005, Antoon Pardon wrote: Op 2005-02-09, Roman Suzi schreef <[EMAIL PROTECTED]>: Just to be sure, is email package of Python 2.3 thread-safe or not (to use, for example, in python-milter?) Can I assume that everything else without such notice is thread-safe? I doubt it. There

Is email package thread safe? (fwd)

2005-02-09 Thread Roman Suzi
(this is a repost with an addition - probably noone noticed my message first time) Hi! Just to be sure, is email package of Python 2.3 thread-safe or not (to use, for example, in python-milter?) P.S. And where can I find information on particular piece of standard library if it is thread-safe or

Is email package thread safe?

2005-02-07 Thread Roman Suzi
Hi! Just to be sure, is email package of Python 2.3 thread-safe or not (to use, for example, in python-milter?) Sincerely yours, Roman A.Souzi -- http://mail.python.org/mailman/listinfo/python-list

RE: RuntimeError: dictionary changed size during iteration

2005-01-20 Thread Roman Suzi
error is fine. > >.Facundo > Probably, e need not appear in vars() at all... This is why generator closure works fine. Sincerely yours, Roman Suzi -- [EMAIL PROTECTED] =\= My AI powered by GNU/Linux RedHat 7.3 -- http://mail.python.org/mailman/listinfo/python-list

RuntimeError: dictionary changed size during iteration

2005-01-19 Thread Roman Suzi
;, 'rlcompleter', '__file__', '_[1]', 'atexit', '__name__', 'readline', '__doc__'] Sincerely yours, Roman Suzi -- [EMAIL PROTECTED] =\= My AI powered by GNU/Linux RedHat 7.3 -- http://mail.python.org/mailman/listinfo/python-list

Re: java 5 could like python?

2005-01-12 Thread Roman Suzi
some >hacks? would be worth the effort? If not what can i do to use efficiently >python modules and libraries? I recall, i didnt had this problem when doing >small applications with a small set of modules. > >Sorry for my bad english. That is it. I hate English. It has sooo much e

RE: interpreter Py_Initialize/Py_Finalize mem leak?

2005-01-10 Thread Roman Suzi
On Mon, 10 Jan 2005, Delaney, Timothy C (Timothy) wrote: >Roman Suzi wrote: > >> In pure curiosity I tried to compile loop.c from Demo/embed >> and started it with 'print 2+2'. It seems, that both 2.3 and 2.4 >> pythons have memory leaks in Py_Initial

Re: Python3: on removing map, reduce, filter

2005-01-09 Thread Roman Suzi
On Sun, 9 Jan 2005, Paul Rubin wrote: >Andrey Tatarinov <[EMAIL PROTECTED]> writes: I hope there will be from __past__ import functional_paradigma in Python 3 ;-) And, also, what is the best way to replace reduce() ? Sincerely yours, Roman Suzi -- [EMAIL PROTECTED] =\= My AI power

interpreter Py_Initialize/Py_Finalize mem leak?

2005-01-08 Thread Roman Suzi
cc -fpic loop.c -DHAVE_CONFIG_H -lm -lpython2.4 \ -lpthread -lutil -ldl \ -I/usr/local/include/python2.4 \ -L/usr/local/lib/python2.4/config \ -o looptest (It's on Linux RedHat 7.3) I do not know if this is of any importance though. Probably it is for embedded Python uses. Sincerely yours, R

Re: Python evolution: Unease

2005-01-06 Thread Roman Suzi
there were no problems. If there were, they were no greater than installing some devel library and/or adding an include directory. So, Distutils, IMHO, are successful. Yes, probably there could be a no-brainer script to run install directly from zip and/or tar.gz/bz2 file, but I usually check md5, pgp sigs and look inside anyway before running something. Sincerely yours, Roman Suzi -- [EMAIL PROTECTED] =\= My AI powered by GNU/Linux RedHat 7.3 -- http://mail.python.org/mailman/listinfo/python-list

Re: Concepts RE: Python evolution: Unease

2005-01-05 Thread Roman Suzi
quot; of GP is directed to formalise on concepts instead of partial cases (design-by-contract, interfaces etc). Thus, concepts control polymorphism not only from liberation side, but from constraint side too. Right now concepts in Python are reused here and there without explicit mentioning. Concep

Re: Python evolution: Unease

2005-01-05 Thread Roman Suzi
ocols. That is, concepts could be internal (Python) standardizing and quality control technique. We can use constant publicId, systemId a-la XML for concepts, so upgrade path will be similar to HTMLs. This will make concept-changing visible between versions. Sincerely yours, Roman Suzi -- [EMAIL PROTECTED] =\= My AI powered by GNU/Linux RedHat 7.3 -- http://mail.python.org/mailman/listinfo/python-list

Concepts RE: Python evolution: Unease

2005-01-05 Thread Roman Suzi
to express their opinions. Even negative. This helps improve Python. As for concepts, they are from Generic Programming (by Musser and Stepanov) and I feel that Python is in position to implement them to the fullest extent. And IMHO it will be nicer than just Java-like interfaces or Eiffel's

Re: args (was Re: Lambda as declarative idiom (was RE: what is lambda used for in real code?))

2005-01-04 Thread Roman Suzi
On Tue, 4 Jan 2005, Michael Spencer wrote: >Roman Suzi wrote: > >> Maybe this is too outlandish, but I see lambdas as a "quote" mechanism, >> which presents a possibility to postpone (precisely control, delegate) >> evaluation. That is, an ovehead for lambda mus

Re: Python evolution: Unease

2005-01-04 Thread Roman Suzi
On Tue, 4 Jan 2005, Dave Brueck wrote: >Roman Suzi wrote: >>>The term "generic programming" is too... er... generic. :) >> Nope. It is not generic. It has it's definition made by the co-author >> of STL - A.Stepanov. And the Boost C++ library (many of us

Re: Python evolution: Unease

2005-01-04 Thread Roman Suzi
nes (which I read). >"Python could have honest support of Concepts (url)" - of course, right now those sources are C++-specific. But I could see that Python has even greater potential to have concepts ahead of C++ and with greater usefulness at the same time. Sincerely yours, Roman Suzi -- [EMAIL PROTECTED] =\= My AI powered by GNU/Linux RedHat 7.3 -- http://mail.python.org/mailman/listinfo/python-list

Re: Python evolution: Unease

2005-01-04 Thread Roman Suzi
anding of GP came after just one book on the topic. Sincerely yours, Roman Suzi -- [EMAIL PROTECTED] =\= My AI powered by GNU/Linux RedHat 7.3 -- http://mail.python.org/mailman/listinfo/python-list

Re: Python evolution: Unease

2005-01-04 Thread Roman Suzi
On Tue, 4 Jan 2005, Dave Brueck wrote: >Roman Suzi wrote: >>>>It may be optional in the sense that the language will >>>>accept missing declarations but as soon as the feature >>>>is available it will become "mandatory" to use it >>>

Re: Optional Static Typing: Part II

2005-01-04 Thread Roman Suzi
ow concepts are expressed informally in the docstrings. Sincerely yours, Roman Suzi -- [EMAIL PROTECTED] =\= My AI powered by GNU/Linux RedHat 7.3 -- http://mail.python.org/mailman/listinfo/python-list

Re: Python evolution: Unease

2005-01-04 Thread Roman Suzi
ut generic programming coming into fashion anytime soon? >That's my fear - type declarations could become one of the most abused language >features because they'd get used too often. > >-Dave > Sincerely yours, Roman Suzi -- [EMAIL PROTECTED] =\= My AI powered by GNU/Linux Re

Re: Lambda as declarative idiom (was RE: what is lambda used for in real code?)

2005-01-04 Thread Roman Suzi
On Tue, 4 Jan 2005, Steven Bethard wrote: >Roman Suzi wrote: >> On Mon, 3 Jan 2005, Steven Bethard wrote: >> >> >>>Roman Suzi wrote: >>> >>>>I wish lambdas will not be deprecated in Python but the key to that is >>>>dropping the

RE: Python evolution: Unease

2005-01-04 Thread Roman Suzi
On Tue, 4 Jan 2005, Batista, Facundo wrote: Maybe OP doesn't yet fully comprehend the ways of Python universe? As for his claims, I am quite surprised that Python lacks something in the docs. Concerning better hierarchy in the standard library, it is interesting that there are some movements in

Re: Lambda as declarative idiom (was RE: what is lambda used for in real code?)

2005-01-04 Thread Roman Suzi
On Mon, 3 Jan 2005, Steven Bethard wrote: > Roman Suzi wrote: > > I wish lambdas will not be deprecated in Python but the key to that is > > dropping the keyword (lambda). If anybody could think of a better syntax for > > lambdas _with_ arguments, we could develop PEP

Re: Lambda as declarative idiom (was RE: what is lambda used for in real code?)

2005-01-03 Thread Roman Suzi
. Sincerely yours, Roman Suzi -- [EMAIL PROTECTED] =\= My AI powered by GNU/Linux RedHat 7.3 -- http://mail.python.org/mailman/listinfo/python-list

DB-API 2.0 in pysqlite and pgdb

2005-01-01 Thread Roman Suzi
ow how to handle type %s' % type(x) pgdb.InterfaceError: do not know how to handle type (It was after I commented out exception catch: # except: # raise OperationalError, "internal error in '%s'" % sql in pgdb.py to see where the error occurs) Am I missing something obvious or is it really a bug/feature of pgdb? python2.3 postgresql-7.2.1 almost fresh mx.DateTime Thank you! Sincerely yours, Roman Suzi -- [EMAIL PROTECTED] =\= My AI powered by GNU/Linux RedHat 7.3 -- http://mail.python.org/mailman/listinfo/python-list

A puzzle Re: Decorators for multimethods

2004-12-10 Thread Roman Suzi
od.Generic.__init__(self) def PART(*args): def make_multimethod(func): mm = Multimethod.Method(tuple(args), func) print func self.add_method(mm) return mm return make_multimethod self.PART = PART self.define() On Fri, 10 Dec 2004, Roman

Decorators for multimethods

2004-12-10 Thread Roman Suzi
27;Foo, Foo:', g(Foo(), Foo()) print 'Foo, Bar:', g(Foo(), Bar()) print 'Bar, Foo:', g(Bar(), Foo()) print 'Bar, Bar:', g(Bar(), Bar()) except Multimethod.AmbiguousMethodError: print 'Failed due to AmbiguousMethodError' Sin