[Python-Dev] Alternative Python VM

2007-02-16 Thread Sokolov Yura
). http://students.ceid.upatras.gr/~sxanth/pyvm/ Sokolov Yura (funny_falcon) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail

[Python-Dev] str.dedent

2005-11-22 Thread Sokolov Yura
/ msg = textwrap.dedent('''\ // IDLE's subprocess can't connect to %s:%d. This may be due \ // to your personal firewall configuration. It is safe to \ // allow this internal connection because no data is visible on \ // external ports.''' % address) // /

[Python-Dev] (no subject)

2005-11-11 Thread Sokolov Yura
Mixing Decimal and float is nearly ALWAYS a user error. Doing it correctly requires significant expertise in the peculiarities of floating point representations. So that I think user should declare floats explicitly (###.###f) - he will fall into float space only if he wish it. So Python

[Python-Dev] Unifying decimal numbers.

2005-11-09 Thread Sokolov Yura
Excuse my English I think, we could just segregate tokens for decimal and real float and make them interoperable. Motivation: Most of us works with business databases - all floats are really decimals, algebraic operations should work without float inconsistency and those operations rare so

[Python-Dev] PEP 3000 and exec

2005-10-13 Thread Sokolov Yura
Agree. i=1 def a(): i=2 def b(): print i return b a()() 2 def a(): i=2 def b(): exec print i return b a()() 1 ___ Python-Dev mailing list Python-Dev@python.org

[Python-Dev] Pythonic concurrency - offtopic

2005-10-13 Thread Sokolov Yura
Offtopic: Microsoft Windows [Version 5.2.3790] (C) Copyright 1985-2003 Microsoft Corp. G:\Working\1c:\Python24\python Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)] on win32 Type help, copyright, credits or license for more information. from os import fork Traceback

[Python-Dev] Autoloading? (Making Queue.Queue easier to use)

2005-10-13 Thread Sokolov Yura
May be allow modules to define __getattr__ ? def __getattr__(thing): try: return __some_standart_way__(thing) except AttributeError: if thing==Queue: import sys from Queue import Queue

[Python-Dev] Adding a conditional expression in Py3.0

2005-09-27 Thread Sokolov Yura
New keyword is so expensive? And why special case for 'then' is better than special case for 'take'? ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe:

[Python-Dev] Adding a conditional expression in Py3.0

2005-09-25 Thread Sokolov Yura
Sorry for looking in every hole. Just a suggestion. A= condition and first or second problem is in case when first in (None,0,[],). May be invent new operator 'take'. take - returns right operator when left evals to True and stops computing condidtional expression. Then we could write: A =

[Python-Dev] GIL, Python 3, and MP vs. UP

2005-09-22 Thread Sokolov Yura
Ok. While windows already prefers threads, while linux-2.6 improves thread support and speed, while process startup expensive on time and memory, while we ought to dublicate our data and/or use obscure shared memory, while it is much simpler to make threaded program with care just about locks

Re: [Python-Dev] Skiping searching throw dictionaries of mro() members.

2005-09-15 Thread Sokolov Yura
Phillip J. Eby wrote: At 09:12 PM 9/14/2005 +0400, Sokolov Yura wrote: We could cash looks by this way: Store with a class its version. Every time after creation when we change a class (add,remove or chage class member, including __base__, __bases__ and mro) , we increase the version

[Python-Dev] Variant of removing GIL.

2005-09-15 Thread Sokolov Yura
Excuse my English. I think I know how to remove GIL Obviously I am an idiot. First about Py_INCREF and Py_DECREF. We should not remove GIL at all. We should change it. It must be one writer-many reader in a following semantic: Lock has a read-counter and a write-counter. Initially both

Re: [Python-Dev] Variant of removing GIL.

2005-09-15 Thread Sokolov Yura
Corrections: Now, every thread keeps one n queue of objects to incref and second queue to decref. Both can be implemented as array, cause they will be freed at once. Initially, every thread acquires GIL for read. Py_INCREF places a ref into a incref queue of a thread, Py_DECREF places a ref

[Python-Dev] Skiping searching throw dictionaries of mro() members.

2005-09-14 Thread Sokolov Yura
Excuse my english. I have a complex Idea. It can be not worth, but just look at. It touches the classes and inheritance. Base point: We change classes not too often. But every look at a member leads to search throw a __dict__ of all bases in ierarhy till member found. We could cache this search