Re: [Python-Dev] Two small PEP ideas

2010-04-30 Thread Maciej Fijalkowski
On Fri, Apr 30, 2010 at 5:08 PM, Benjamin Peterson benja...@python.org wrote: 2010/4/30 Antoine Pitrou solip...@pitrou.net: Jesse Noller jnoller at gmail.com writes: Consider this a plaintitive -1 to any sort of rule-or-decision based on committee. I'd much rather a 2x4 to the forehead.

Re: [Python-Dev] Very Strange Argument Handling Behavior

2010-04-17 Thread Maciej Fijalkowski
On Sat, Apr 17, 2010 at 11:38 AM, Dino Viehland di...@microsoft.com wrote: Benjamin wrote: 2010/4/17 Guido van Rossum gu...@python.org: On Sat, Apr 17, 2010 at 9:22 AM, Nick Coghlan ncogh...@gmail.com wrote: Guido van Rossum wrote: Because Python promises that the object the callee sees

Re: [Python-Dev] Very Strange Argument Handling Behavior

2010-04-17 Thread Maciej Fijalkowski
On Sat, Apr 17, 2010 at 12:03 PM, Dino Viehland di...@microsoft.com wrote: Maciej wrote: On Sat, Apr 17, 2010 at 11:38 AM, Dino Viehland di...@microsoft.com wrote: Benjamin wrote: 2010/4/17 Guido van Rossum gu...@python.org: On Sat, Apr 17, 2010 at 9:22 AM, Nick Coghlan

Re: [Python-Dev] Very Strange Argument Handling Behavior

2010-04-17 Thread Maciej Fijalkowski
On Sat, Apr 17, 2010 at 1:03 PM, Steve Holden st...@holdenweb.com wrote: Dino Viehland wrote: Maciej wrote: [...] And yet that breaks some code :-) Sure, if you do: class C(object):     locals()[object()] = 42 dir(C) You lose.  Once I'm aware of some piece of code in the wild doing

Re: [Python-Dev] Very Strange Argument Handling Behavior

2010-04-16 Thread Maciej Fijalkowski
On Fri, Apr 16, 2010 at 3:11 PM, Raymond Hettinger raymond.hettin...@gmail.com wrote: Guido van Rossum, 16.04.2010 16:33: I am fine with declaring dict({}, **{1:3}) illegal, since after all it is abuse of the ** mechanism. ISTM that making it illegal costs cycles with giving any real

Re: [Python-Dev] python compiler

2010-04-05 Thread Maciej Fijalkowski
On Mon, Apr 5, 2010 at 9:31 AM, Craig Citro craigci...@gmail.com wrote: for a college project, I proposed to create a compiler for python. I've read something about it and maybe I saw that made a bad choice. I hear everyone's opinion respond. I don't think everyone thinks this is a bad idea

Re: [Python-Dev] python compiler

2010-04-05 Thread Maciej Fijalkowski
On Mon, Apr 5, 2010 at 1:47 PM, Craig Citro craigci...@gmail.com wrote: There has been some contentious debate about this in the past, where a Cython developer(s?) insisted Cython be listed among the Python implementations somewhere, on a par with IronPython, Jython and PyPy. This does not

Re: [Python-Dev] python compiler

2010-04-05 Thread Maciej Fijalkowski
On Mon, Apr 5, 2010 at 2:21 PM, Michael Foord fuzzy...@voidspace.org.uk wrote: On 05/04/2010 21:10, Terry Reedy wrote: On 4/5/2010 10:54 AM, will...@ufpa.br wrote: for a college project, I proposed to create a compiler for python. I've read something about it and maybe I saw that made a bad

Re: [Python-Dev] python compiler

2010-04-05 Thread Maciej Fijalkowski
On Mon, Apr 5, 2010 at 3:03 PM, Martin v. Löwis mar...@v.loewis.de wrote: Is the requirement just the construction of full tracebacks in the event of an exception? Because Cython does that right now. In the event of an exception, the Python call frames are constructed as the C call stack is

Re: [Python-Dev] Why is nan != nan?

2010-03-25 Thread Maciej Fijalkowski
-1 = -1 implies log(-1) = log(-1) Mathematically speaking this is incorrect. x = y implies log(x) = log(y) for x 0 and y 0 Cheers, fijal ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev

Re: [Python-Dev] Catch SIGINT at Python startup

2010-03-08 Thread Maciej Fijalkowski
On Mon, Mar 8, 2010 at 10:47 AM, Guido van Rossum gu...@python.org wrote: Actually it sounds like there's some overly general except clause somewhere that should be adjusted to catch just Exception instead of *. There is at least one that prints import 'site' failed and continues to run your

Re: [Python-Dev] Platform extension for distutils on other interpreters than CPython

2010-02-24 Thread Maciej Fijalkowski
On Wed, Feb 24, 2010 at 6:35 AM, Nick Coghlan ncogh...@gmail.com wrote: Tarek Ziadé wrote: That makes me wonder : why don't we have a sys.implementation variable ? (cython/jython/pypi), since we can have several values for cython in sys.platform Hello. So I propose to have a

Re: [Python-Dev] Mercurial repository for Python benchmarks

2010-02-24 Thread Maciej Fijalkowski
On Wed, Feb 24, 2010 at 12:12 PM, Dave Fugate dfug...@microsoft.com wrote: Would there be any interest in accepting IronPython's in-house benchmarks into this repository as well?  Internally we run the usual suspects (PyStone, PyBench, etc), but we also have a plethora of custom benchmarks

Re: [Python-Dev] Platform extension for distutils on other interpreters than CPython

2010-02-24 Thread Maciej Fijalkowski
On Wed, Feb 24, 2010 at 11:17 AM, Glyph Lefkowitz gl...@twistedmatrix.com wrote: On Feb 23, 2010, at 2:10 PM, Tarek Ziadé wrote: On Tue, Feb 23, 2010 at 1:50 PM, Maciej Fijalkowski fij...@gmail.com wrote: Hello. I would like to have a feature on platform module (or sys or somewhere

[Python-Dev] Platform extension for distutils on other interpreters than CPython

2010-02-23 Thread Maciej Fijalkowski
Hello. I would like to have a feature on platform module (or sys or somewhere) that can tell distutils or distutils2 that this platform (be it PyPy or Jython) is not able to compile any C module. The purpose of this is to make distutils bail out in more reasonable manner than a compilation error

Re: [Python-Dev] Platform extension for distutils on other interpreters than CPython

2010-02-23 Thread Maciej Fijalkowski
On Tue, Feb 23, 2010 at 2:27 PM, Tarek Ziadé ziade.ta...@gmail.com wrote: On Tue, Feb 23, 2010 at 2:10 PM, Tarek Ziadé ziade.ta...@gmail.com wrote: On Tue, Feb 23, 2010 at 1:50 PM, Maciej Fijalkowski fij...@gmail.com wrote: Hello. I would like to have a feature on platform module (or sys

Re: [Python-Dev] Mercurial repository for Python benchmarks

2010-02-21 Thread Maciej Fijalkowski
Hello. We probably also need some people, besides CPython devs having some access to it (like me). Cheers, fijal On Sun, Feb 21, 2010 at 4:51 PM, Daniel Stutzbach dan...@stutzbachenterprises.com wrote: On Sun, Feb 21, 2010 at 2:28 PM, Collin Winter collinwin...@google.com wrote: Would it be

Re: [Python-Dev] PEP 3146: Merge Unladen Swallow into CPython

2010-02-11 Thread Maciej Fijalkowski
Snippet from: http://codereview.appspot.com/186247/diff2/5014:8003/7002 *PyPy*: PyPy [#pypy]_ has good performance on numerical code, but is slower than Unladen Swallow on non-numerical workloads. PyPy only supports 32-bit x86 code generation. It has poor support for CPython extension modules,

Re: [Python-Dev] Improved Traceback Module

2010-01-28 Thread Maciej Fijalkowski
On Thu, Jan 28, 2010 at 2:33 PM, Benjamin Schweizer we...@benjamin-schweizer.de wrote: Hello, I've updated the traceback.py module; my improved version dumps all local variabes from the stack trace, which helps in debugging rare problems. You can find details in my latest blog post here:  

Re: [Python-Dev] O(1) random access to deque? (Re: patch to make list.pop(0) work in O(1) time)

2010-01-27 Thread Maciej Fijalkowski
FWIW, deque indexing for small deques is already O(1) and somewhat fast.  You only get O(n) degradation (with a small contant factor) on large deques. Hi. For small dequeues (smaller than a constant), you have to have O(1) operations, by definition :-) Cheers, fijal

Re: [Python-Dev] recursive closures - reference leak

2009-12-08 Thread Maciej Fijalkowski
Ah, yes.  In my particular case, I'm running a cluster of hundreds of nodes, supporting 50.000 players in a real-time space simulation.  We disable GC because of its unpredictable performance impact and are careful to avoid reference cycles.  We use gc from time to time to _find_ those

Re: [Python-Dev] Interest in integrating C decimal module into Python?

2009-10-20 Thread Maciej Fijalkowski
On Tue, Oct 20, 2009 at 3:00 PM, Paul Moore p.f.mo...@gmail.com wrote: 2009/10/20 Stefan Krah stefan-use...@bytereef.org: Hi, as some of you know, recently I've released an arbitrary precision C library for decimal arithmetic together with a Python module:

Re: [Python-Dev] run time error anlysis of python source code

2009-06-21 Thread Maciej Fijalkowski
On Sun, Jun 21, 2009 at 5:05 PM, Daniel Dinizaja...@gmail.com wrote: Hi David, omega_force2...@yahoo.com wrote: It appears that one possibility of investigation into the development of a safety-critical variant of the python language There is some interesting work related to a

Re: [Python-Dev] Correction: Python Bug Day on April 25

2009-04-15 Thread Maciej Fijalkowski
On Wed, Apr 15, 2009 at 1:10 PM, Georg Brandl ge...@python.org wrote: Hi, I managed to screw up the date, so here it goes again: I'd like to announce that there will be a Python Bug Day on April 25. As always, this is a perfect opportunity to get involved in Python development, or bring

[Python-Dev] issue5578 - explanation

2009-03-31 Thread Maciej Fijalkowski
So. The issue was closed and I suppose it was closed by not entirely understanding the problem (or I didn't get it completely). The question is - what the following code should do? def f(): a = 2 class C: exec 'a = 42' abc = a return C print f().abc (quick answer - on python2.5

Re: [Python-Dev] issue5578 - explanation

2009-03-31 Thread Maciej Fijalkowski
attributes. I actually think the 2.5 behavior is correct, and I don't know why it changed in 2.6. --Guido On Tue, Mar 31, 2009 at 8:15 PM, Maciej Fijalkowski fij...@gmail.com wrote: So. The issue was closed and I suppose it was closed by not entirely understanding the problem (or I didn't get

Re: [Python-Dev] issue5578 - explanation

2009-03-31 Thread Maciej Fijalkowski
Shame on me indeed. On Wed, Apr 1, 2009 at 5:38 AM, Guido van Rossum gu...@python.org wrote: OK that might change matters. Shame on you though for posting a patch without any explanation of the issue. On Tue, Mar 31, 2009 at 8:36 PM, Maciej Fijalkowski fij...@gmail.com wrote: Because classes

Re: [Python-Dev] Core projects for Summer of Code

2009-03-18 Thread Maciej Fijalkowski
While working on the core is admirable, I think gsoc would provide an opportunity to port important Python libraries to 3.x. It's important to remember that doing ports helps the core immensely by uncovering 2to3 and py3k bugs. Hello. It's a very noble task to have important python

Re: [Python-Dev] __del__ and tp_dealloc in the IO lib

2009-01-23 Thread Maciej Fijalkowski
That would be break so much code that I doubt that, in practice, you can slip it through within a release. Besides, being able to write simpler code like for L in open(foo.txt) is per-se a good reason *not to* put file objects in cycles; so you will probably need more than one good reason to

Re: [Python-Dev] Trap SIGSEGV and SIGFPE

2008-12-11 Thread Maciej Fijalkowski
If we could calculate how much stack is left we'd have a much more robust way of doing recursion limits. I suppose this could be done by reading a byte from each page with a temporary SIGSEGV handler installed, but I'm not convinced you can't ask the platform directly somehow. I'd also be

Re: [Python-Dev] Taint Mode in Python 3.0

2008-12-04 Thread Maciej Fijalkowski
When I try to run this, I get: Fatal Python error: Py_Initialize: can't initialize sys standard streams Traceback (most recent call last): File /home/fijal/lang/python/Python30/Lib/encodings/__init__.py, line 31, in module File /home/fijal/lang/python/Python30/Lib/codecs.py, line 1060, in

Re: [Python-Dev] Taint Mode in Python 3.0

2008-12-04 Thread Maciej Fijalkowski
Hello, The thing is pypy's taint code is broken. Basically you don't only need to patch all places that return pyobject, but also all places that might modify anything. (All side effects) For example innocently looking call to addition might end up calling arbitrary python code (and have

Re: [Python-Dev] Fwd: Removal of GIL through refcounting removal.

2008-11-01 Thread Maciej Fijalkowski
... We know it is the plan for PyPy to work in this way, and also that Jython and Ironpython works like that (using the host vm's GC), so it seems to be somehow agreeable with the python semantics (perhaps not really with __del__ but they are not really nice anyway). PyPy has a

Re: [Python-Dev] ANNOUNCE: CapPython, an object-capability subset of Python

2008-09-19 Thread Maciej Fijalkowski
PyPy offers sandboxing interpreter without compromising language features itself. Here are docs: http://codespeak.net/pypy/dist/pypy/doc/sandbox.html Also, are you aware of directory Lib/test/crashers (in python's svn) which contains some possible ways to segfault cpython? (which can lead to

[Python-Dev] What this code should do?

2008-09-19 Thread Maciej Fijalkowski
Hello, I'm a little clueless about exact semantics of following snippets: http://paste.pocoo.org/show/85698/ is this fine? or shall I fill the bug? (the reason to ask is because a) django is relying on this b) pypy implements it differently) cheers, fijal

Re: [Python-Dev] What this code should do?

2008-09-19 Thread Maciej Fijalkowski
On Fri, Sep 19, 2008 at 9:30 PM, Jean-Paul Calderone [EMAIL PROTECTED] wrote: On Fri, 19 Sep 2008 18:26:05 +0200, Amaury Forgeot d'Arc [EMAIL PROTECTED] wrote: Hello Maciej, Maciej Fijalkowski wrote: Hello, I'm a little clueless about exact semantics of following snippets: http

Re: [Python-Dev] the explicit self

2008-08-27 Thread Maciej Fijalkowski
You can provide selfless class as a class with special metaclass that overloads __new__ and changes signature of each method. Not sure how good is this, but requires no changes to the language and will work as you want. Cheers, fijal On Wed, Aug 27, 2008 at 8:46 AM, Kilian Klimek [EMAIL

Re: [Python-Dev] Opcode frequency

2008-06-19 Thread Maciej Fijalkowski
On Thu, Jun 19, 2008 at 1:03 AM, Raymond Hettinger [EMAIL PROTECTED] wrote: Maciej Fijalkowski did an opcode analysis for PyPy, it also shows the relative frequency of opcodes following a specifc one: http://codespeak.net/svn/user/fijal/opcodes.txt Might it make sense to add more PREDICT

Re: [Python-Dev] bug or a feature?

2008-06-11 Thread Maciej Fijalkowski
On Thu, Jun 12, 2008 at 2:32 AM, Terry Reedy [EMAIL PROTECTED] wrote: Scott Dial [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] || If non-string keys are not allowed in __dict__, then the AddOns library | should be changed to add another dict to the object of interest to track |

[Python-Dev] bug or a feature?

2008-06-10 Thread Maciej Fijalkowski
What do you think about this code: class A: locals()[42] = 98 Seems people rely on it working. Do we consider it part of python language? (Note that you cannot do the same with getattr/setattr which checks if argument is a string) Cheers, fijal ___

Re: [Python-Dev] bug or a feature?

2008-06-10 Thread Maciej Fijalkowski
On Wed, Jun 11, 2008 at 3:36 AM, Scott Dial [EMAIL PROTECTED] wrote: Maciej Fijalkowski wrote: What do you think about this code: class A: locals()[42] = 98 Seems people rely on it working. I apologize for my ignorance, but who? Could you please cite something reputable that relies

Re: [Python-Dev] on Python's tests (and making them better)

2008-06-05 Thread Maciej Fijalkowski
On Thu, Jun 5, 2008 at 6:23 PM, Benjamin Peterson [EMAIL PROTECTED] wrote: Hi, This summer, I am going to be revamping Python's test suite. Major things I plan to do include - rewriting regrtest.py to be a simple test driver - implementing CPython only decorators - moving skipping data to

Re: [Python-Dev] Segfault

2007-08-27 Thread Maciej Fijalkowski
Honestly, the argument that this code is already gone in 3.0 is not very valid. 2.x version would be probably used for many years. Cheers, fijal ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev

[Python-Dev] Segfault

2007-08-20 Thread Maciej Fijalkowski
IMHO this shouldn't segfault: import thread while 1: f = open(/tmp/dupa, w) thread.start_new_thread(f.close, ()) f.close() while it does on cpython 2.5.1, linux box. May I consider this a bug? ___ Python-Dev mailing list

[Python-Dev] os.tmpfile() problem

2007-08-07 Thread Maciej Fijalkowski
I've got slight problem with os.tmpfile(). What I would like to do is to get the filedesc of tmpfile. First approach: os.tmpfile().fileno() of course does not work out, because fileno() does not keep object alive. The solution is to keep os.tmpfile() result somewhere for an arbitrary amount of

<    1   2   3   4