Re: [Python-Dev] python 3.0, tp_compare not used for == test?

2009-02-02 Thread Mark Dickinson
ut I'd like to complete the rest of the cmp removal stuff first. Mark ___ 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-archive.com

Re: [Python-Dev] python 3.0, tp_compare not used for == test?

2009-02-02 Thread Mark Dickinson
On Mon, Feb 2, 2009 at 10:36 AM, Nick Coghlan wrote: > I'm wondering if Mark should add the exception he recently removed back > in as a Deprecation Warning when tp_compare is defined, but > tp_richcompare is not. This sounds reasonable to me. A third-party module that implements

Re: [Python-Dev] Python 3 optimizations continued...

2011-08-30 Thread Mark Shannon
lk of the real-world benchmark suite used for speed.pypy.org is available for Python 3. (Wasn't there a GSoC project about that?) +1 Cheers, Mark. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Un

Re: [Python-Dev] Python 3 optimizations continued...

2011-08-30 Thread Mark Shannon
ython, yet is able to outperform Unladen Swallow using interpreter-only optimisations. (It goes even faster with the compiler turned on :) ) Cheers, Mark. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailma

Re: [Python-Dev] Python 3 optimizations continued...

2011-09-01 Thread Mark Shannon
e sort of deoptimisation will be required in order to recover the correct VM state. Cheers, Mark. Regards, Cesare ___ Python-Dev mailing list Python-Dev@python

Re: [Python-Dev] [Python-checkins] cpython: Enhance Py_ARRAY_LENGTH(): fail at build time if the argument is not an array

2011-09-29 Thread Mark Dickinson
other two, but Py_ARITHMETIC_RIGHT_SHIFT is definitely platform dependent, which is why it's in pyport.h in the first place. Mark ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mai

Re: [Python-Dev] PEP397 no command line options to python?

2011-10-17 Thread Mark Hammond
uot;py t3" as a request for python version as if '-3' had been specified. I have a small patch that fixes this and implements the above for pylauncher with extra tests if there is interest. That certainly sounds like a bug and a patch sent to https

Re: [Python-Dev] PEP397 no command line options to python?

2011-10-17 Thread Mark Hammond
le -v" versus "python -v -m somemodule". etc. For these reasons I'm still advocating we don't support such command-lines, but as usual I'll go with the consensus :) Cheers, Mark ___ Python-Dev mailing list Python-Dev@

Re: [Python-Dev] PEP397 no command line options to python?

2011-10-18 Thread Mark Hammond
is clear that many people want it and ensure we aren't creating other inconsistencies or issues when we do. If it turns out to be true that even with clear documentation people come to the same conclusion as you (ie, that py.exe supports arguments the same way as python.exe) we still have the

Re: [Python-Dev] PEP397 no command line options to python?

2011-10-23 Thread Mark Hammond
people who can use Unix-style $() or Powershell& to directly execute the output as a command. & (py -3 --which) How about abusing the existing flags for this purpose - eg: % py -3? % py -2.7? etc. Mark ___ Python-Dev mailing list Python-

Re: [Python-Dev] PEP397 no command line options to python?

2011-10-23 Thread Mark Hammond
On 24/10/2011 10:36 AM, Nick Coghlan wrote: On Mon, Oct 24, 2011 at 8:15 AM, Mark Hammond wrote: How about abusing the existing flags for this purpose - eg: % py -3? % py -2.7? What does using the magic symbol offer over an explicit separate flag? * The "magic" symbol is som

Re: [Python-Dev] PEP397 no command line options to python?

2011-10-23 Thread Mark Hammond
On 24/10/2011 11:46 AM, Nick Coghlan wrote: On Mon, Oct 24, 2011 at 10:00 AM, Mark Hammond wrote: * The "magic" symbol is somewhat self-documenting - it implies a question. Using --which adds another special case that people would need to understand isn't passed to Python. I

Re: [Python-Dev] PEP397 no command line options to python?

2011-10-23 Thread Mark Hammond
On 24/10/2011 12:56 PM, Michael Urman wrote: On Sun, Oct 23, 2011 at 17:15, Mark Hammond wrote: How about abusing the existing flags for this purpose - eg: % py -3? % py -2.7? I would have expected that to launch an interactive python shell of the appropriate version. Does it do something

Re: [Python-Dev] Use our strict mbcs codec instead of the Windows ANSI API

2011-10-24 Thread Mark Hammond
+1 from me! Mark On 25/10/2011 9:57 AM, Victor Stinner wrote: Hi, I propose to raise Unicode errors if a filename cannot be decoded on Windows, instead of creating a bogus filenames with questions marks. Because this change is incompatible with Python 3.2, even if such filenames are unusable

Re: [Python-Dev] Emit a BytesWarning on bytes filenames on Windows

2011-10-28 Thread Mark Hammond
can't deprecate it and a new BytesWarning seems gratuitous.) Cheers, Mark ___ 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-archive.com

Re: [Python-Dev] Emit a BytesWarning on bytes filenames on Windows

2011-10-30 Thread Mark Hammond
On 31/10/2011 8:39 AM, Victor Stinner wrote: Le 29/10/2011 07:47, Mark Hammond a écrit : When previously discussing this issue, I was under the impression that the problem was unencodable bytes passed from the Python code to Windows - but the reverse is true - only the data coming back from

Re: [Python-Dev] how to find the file path to an extension module at init time?

2011-11-14 Thread mark florisson
On 14 November 2011 08:18, Stefan Behnel wrote: > "Martin v. Löwis", 13.11.2011 21:46: >>> >>> I'm asking specifically because I'd like to properly implement __file__ >>> in Cython modules at module init time. >> >> Why do you need to implement __file__? Python will set it eventually to >> its cor

[Python-Dev] A new dict for Xmas?

2011-12-15 Thread Mark Shannon
u get. By the way it passes all the tests, but there are strange interactions with weakrefs and the GC. (Try running the tests, you'll see what I mean) Cheers, Mark ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailma

Re: [Python-Dev] A new dict for Xmas?

2011-12-15 Thread Mark Shannon
Antoine Pitrou wrote: On Thu, 15 Dec 2011 22:18:18 + Mark Shannon wrote: For the gcbench benchmark (from unladen swallow), cpython with the new dict is about 9% faster and, more importantly, reduces memory use from 99 Mbytes to 61Mbytes (a 38% reduction). All tests were done on my ancient

Re: [Python-Dev] A new dict for Xmas?

2011-12-16 Thread Mark Shannon
Greg Ewing wrote: Mark Shannon wrote: I have a new dict implementation which allows sharing of keys between objects of the same class. We already have the __slots__ mechanism for memory savings. Have you done any comparisons with that? You can't make Python programmers use slots, ne

Re: [Python-Dev] A new dict for Xmas?

2011-12-16 Thread Mark Shannon
Jim Jewett wrote: Greg Ewing wrote: Mark Shannon wrote: I have a new dict implementation which allows sharing of keys between objects of the same class. We already have the __slots__ mechanism for memory savings. Have you done any comparisons with that? You can't make P

Re: [Python-Dev] A new dict for Xmas?

2011-12-16 Thread Mark Shannon
Terry Reedy wrote: On 12/16/2011 5:03 AM, Mark Shannon wrote: Of course using __slots__ saves more memory, but people don't use them much. Do you think the stdlib should be using __slots__ more? For some things yes, but where it's critical slots are already used. Take the ordered

Re: [Python-Dev] Fwd: Anyone still using Python 2.5?

2011-12-21 Thread Mark Hammond
- 3,000 n/a 2.3 - 1,000 n/a So ISTM that 2.5 isn't hugely popular these days, but also isn't insignificant. It probably means I could "safely" drop 2.3 and 2.4 support though... Mark On 21/12/2011 6:16 PM, Chris Withers wrote: What's th

Re: [Python-Dev] A new dict for Xmas?

2011-12-23 Thread Mark Shannon
s to an immutable keys(-set -table -vector?) then just treat it as mutable. I'll modify the repo to incorporate these changes when I have a chance. Cheers, Mark. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailma

Re: [Python-Dev] A new dict for Xmas?

2011-12-23 Thread Mark Shannon
yes, "patches welcome" ;) Thanks for the feedback. Cheers, Mark. Regards, Martin import sys d = sys.getobjects(0,dict) print(len(d), "dicts") d2 = [] for o in d: keys = o.keys() if not keys:continue types = tuple(set(type(k) for k in keys)) if types != (str,

Re: [Python-Dev] A new dict for Xmas?

2011-12-23 Thread Mark Shannon
simple as reasonably possible. Refinements can be added later. Cheers, Mark. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/

Re: [Python-Dev] Hash collision security issue (now public)

2011-12-29 Thread Mark Shannon
deobject.c to do properly. Cheers, Mark diff -r f1298f4ec638 Objects/unicodeobject.c --- a/Objects/unicodeobject.c Wed Dec 28 14:59:40 2011 + +++ b/Objects/unicodeobject.c Thu Dec 29 11:11:09 2011 + @@ -41,6 +41,7 @@ #define PY_SSIZE_T_CLEAN #include "Python.h" #include "uc

Re: [Python-Dev] Hash collision security issue (now public)

2011-12-29 Thread Mark Shannon
in a while might be a good thing :) Cheers, Mark. Raymond On Dec 28, 2011, at 5:28 PM, Michael Foord wrote: Hello all, A paper (well, presentation) has been published highlighting security problems with the hashing algorithm (exploiting collisions) in many programming languages P

[Python-Dev] Testing the tests by modifying the ordering of dict items.

2012-01-05 Thread Mark Shannon
http://bugs.python.org/issue13703. Should I: 1. Submit one big bug report? 2. Submit a bug report for each "failing" test separately? 3. Ignore it, since the tests only fail when I start messing about? Cheers, Mark. ___ Python-Dev mailing l

Re: [Python-Dev] Hash collision security issue (now public)

2012-01-06 Thread Mark Shannon
down only needed parts of some applications. The minimal proposed change of seeding the hash from a global value (a single memory read and an addition) will have such a minimal performance effect that it will be undetectable even on the most noise-free testing environment. Cheers,

Re: [Python-Dev] Hash collision security issue (now public)

2012-01-06 Thread Mark Shannon
. If and only if (and I think this unlikely) the solution chosen is shown to be vulnerable to a more sophisticated attack then a new issue should be opened and dealt with separately. Cheers, Mark. ___ Python-Dev mailing list Python-Dev@python.org http

Re: [Python-Dev] py3benchmark not working

2012-01-09 Thread Mark Shannon
"method"][0].value.encode("ascii")) TypeError: Can't convert 'bytes' object to str implicitly You can temporarily "fix" this by removing the .encode("ascii") from line 89 in lib2to3/fixes/fix_op

Re: [Python-Dev] Status of the fix for the hash collision vulnerability

2012-01-13 Thread Mark Dickinson
What about the set: ieee754_powers_of_two = {2.0**n for n in range(-1074, 1024)} ? The > 2000 elements of the latter set have only 61 distinct hash values on 64-bit machine, so there will be over 2000 total collisions involved in creating this set (though admittedly only around 30 collisions per

Re: [Python-Dev] Status of the fix for the hash collision vulnerability

2012-01-13 Thread Mark Dickinson
eback (most recent call last): File "", line 1, in File "", line 1, in KeyError: 'too many hash collisions' [67961 refs] I'd still not consider this particularly pathological, though. -- Mark ___ Python-Dev ma

[Python-Dev] Coroutines and PEP 380

2012-01-17 Thread Mark Shannon
print(co.send(None)) Which will output: 0 1 0 2 0 1 0 None Traceback (most recent call last): File "co_demo.py", line 30, in print(co.send(None)) TypeError: can't send to a halted coroutine Cheers, Mark. ___ Python-Dev mailing

Re: [Python-Dev] Coroutines and PEP 380

2012-01-18 Thread Mark Shannon
Matt Joiner wrote: Just to clarify, this differs in functionality from enhanced generators by allowing you to yield from an arbitrary call depth rather than having to "yield from" through a chain of calling generators? Furthermore there's no syntactical change except to the bottommost frame doi

Re: [Python-Dev] Coroutines and PEP 380

2012-01-18 Thread Mark Shannon
Glyph wrote: On Jan 17, 2012, at 5:03 PM, Mark Shannon wrote: Lets start controversially: I don't like PEP 380, I think it's a kludge. Too late; it's already accepted. There's not much point in making controversial statements about it now. Why is it too late? Prese

[Python-Dev] Changing the order of iteration over a dictionary

2012-01-20 Thread Mark Shannon
id to change that hash function :) Cheers, Mark ___ 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-archive.com

Re: [Python-Dev] [Python-ideas] Coroutines and PEP 380

2012-01-26 Thread Mark Shannon
hould be able to support yield-from much more easily. Cheers, Mark. ___ 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-archive.com

Re: [Python-Dev] Python 3 optimizations, continued, continued again...

2012-01-28 Thread Mark Shannon
c repository for the code, so we can take a look? Cheers, Mark. ___ 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-archive.com

[Python-Dev] A new dictionary implementation

2012-01-29 Thread Mark Shannon
ave a lot of memory and maybe boost performance. Other applications will be largely unaffected. It passes all the tests. (I had to change a couple that relied on dict repr() ordering) Cheers, Mark. ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] A new dictionary implementation

2012-01-29 Thread Mark Shannon
Antoine Pitrou wrote: Hi, On Sun, 29 Jan 2012 10:31:48 + Mark Shannon wrote: Now that issue 13703 has been largely settled, I want to propose my new dictionary implementation again. It is a little more polished than before. https://bitbucket.org/markshannon/hotpy_new_dict I briefly

Re: [Python-Dev] A new dictionary implementation

2012-01-29 Thread Mark Shannon
Antoine Pitrou wrote: On Sun, 29 Jan 2012 09:56:11 -0500 Benjamin Peterson wrote: 2012/1/29 Mark Shannon : Hi, Now that issue 13703 has been largely settled, I want to propose my new dictionary implementation again. It is a little more polished than before. If you're serious about cha

Re: [Python-Dev] A new dictionary implementation

2012-01-29 Thread Mark Shannon
francis wrote: On 01/29/2012 11:31 AM, Mark Shannon wrote: It passes all the tests. (I had to change a couple that relied on dict repr() ordering) Hi Mark, I've cloned the repo, build it the I've tried with ./python -m test. I got some errors: First in general: 340 tests OK. 2 te

Re: [Python-Dev] A new dictionary implementation

2012-01-29 Thread Mark Shannon
submission to Python. A few tests that rely on dict ordering should probably be fixed first. I'll submit bug reports for those. Also, please submit a contrib form if you haven't done so. Where do I find it? Cheers, Mark. ___ Python-Dev ma

Re: [Python-Dev] A new dictionary implementation

2012-01-29 Thread Mark Shannon
Matt Joiner wrote: Mark, Good luck with getting this in, I'm also hopeful about coroutines, maybe after pushing your dict optimization your coroutine implementation will get more consideration. Shush, don't say the C word or you'll put people off ;) I'm actually not t

Re: [Python-Dev] Store timestamps as decimal.Decimal objects

2012-01-31 Thread Mark Shannon
e proof it :) ) which returns an int represent the number of picoseconds since the epoch. ints never loose precision and never overflow. Cheers, Mark. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscr

Re: [Python-Dev] A new dictionary implementation

2012-02-02 Thread Mark Shannon
wise the answer is, as Martin pointed out, it could yes provided that adding a new key does not force a resize. Although it is a bit arbitrary when a resize occurs. The new version will incorporate this behaviour. Expect version 2 soon. Cheers, Mark. ___ P

Re: [Python-Dev] Volunteer

2012-02-06 Thread Mark Lawrence
On 05/02/2012 21:42, Ben Finney wrote: Blockheads Oi Oi writes: I would like to give it another go. Welcome back. Your signature shows the name “Mark Lawrence”. It would help with initial impressions if your ‘From’ field, instead of the pseudonym currently shown, shows your name. Could you

[Python-Dev] [Python-ideas] matrix operations on dict :)

2012-02-07 Thread Mark Janssen
ternet that's being worked on which creates a content-centric Internet beyond the graph-level, hypertext internet. Believe, it will be awesome. Slowing down mark ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/

Re: [Python-Dev] A new dictionary implementation

2012-02-08 Thread Mark Shannon
ion of the LOAD_GLOBAL (and possibly LOAD_ATTR) bytecode: By testing to see if the (immutable) keys-tables is the expected table, the value can accessed directly by index, rather than by name. Cheers, Mark. Notes: All benchmarks from http://hg.python.org/benchmarks/ using the -m flag to get memory

[Python-Dev] Code review tool uses my old email address

2012-02-08 Thread Mark Shannon
Hi, I changed my email address (about a year ago) and updated my bug tracker settings to my new address (late last year). However, the code review tool still shows my old email address. How do I change it? Cheers, Mark. ___ Python-Dev mailing list

[Python-Dev] PEP for new dictionary implementation

2012-02-08 Thread Mark Shannon
Proposed PEP for new dictionary implementation, PEP 410? is attached. Cheers, Mark. PEP: XXX Title: Key-Sharing Dictionary Version: $Revision$ Last-Modified: $Date$ Author: Mark Shannon Status: Draft Type: Standards Track Content-Type: text/x-rst Created: 08-Feb-2012 Python-Version: 3.3 or 3.4

Re: [Python-Dev] PEP for new dictionary implementation

2012-02-08 Thread Mark Shannon
Terry Reedy wrote: On 2/8/2012 2:18 PM, Mark Shannon wrote: A pretty clear draft PEP. Changes to repr() output and iteration order: For most cases, this will be unchanged. However for some split-table dictionaries the iteration order will change. Neither of these cons should be a problem

Re: [Python-Dev] A new dictionary implementation

2012-02-09 Thread Mark Shannon
francis wrote: Hi Mark, I've just cloned : Repository: https://bitbucket.org/markshannon/cpython_new_dict Do please try it on your machine(s). that's a: Linux random 3.1.0-1-amd64 #1 SMP Tue Jan 10 05:01:58 UTC 2012 x86_64 GNU/Linux and I'm getting: gcc -pthread

Re: [Python-Dev] A new dictionary implementation

2012-02-09 Thread Mark Shannon
francis wrote: Hi Mark, Bah... typo in assert statement. My fault for not testing the debug build (release build worked fine). Both builds working now. Yeah, now is working and passes all tests also on my machine. I've tried to run the test suite but I'm getting a SyntaxError: (

[Python-Dev] http://pythonmentors.com/

2012-02-10 Thread Mark Lawrence
Hi all, I'd never heard of this until some Dutch geezer whose name I'm now forgotten pointed me to it. Had I known about it a couple of years ago it would have saved a lot of people a lot of grief. Please could it be given a bit of publicity. -- Cheers. Mark Lawrence. p.s.

Re: [Python-Dev] http://pythonmentors.com/

2012-02-11 Thread Mark Lawrence
inted to by the main page at python.org (Core Development link). Mark, do you have a concrete idea of how it can be made more prominent? Eli Eli, quite frankly no :( The stock answer "put it on the main page at python.org" if actually followed up in all cases would result in som

Re: [Python-Dev] PEP for new dictionary implementation

2012-02-11 Thread Mark Shannon
Antoine Pitrou wrote: Hello Mark, I think the PEP should explain what happens when a keys table needs resizing when setting an object's attribute. If the object is the only instance of a class, it remains split, otherwise the table is combined. Most OO code will set attributes in the __i

Re: [Python-Dev] PEP for new dictionary implementation

2012-02-13 Thread Mark Shannon
Revised PEP for new dictionary implementation, PEP 412? is attached. Cheers, Mark. PEP: XXX Title: Key-Sharing Dictionary Version: $Revision$ Last-Modified: $Date$ Author: Mark Shannon Status: Draft Type: Standards Track Content-Type: text/x-rst Created: 08-Feb-2012 Python-Version: 3.3 or 3.4

Re: [Python-Dev] A new dictionary implementation

2012-02-15 Thread Mark Shannon
itory https://bitbucket.org/markshannon/cpython_new_dict Cheers, Mark. ___ 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-archive.com

Re: [Python-Dev] PEP 410 (Decimal timestamp): the implementation is ready for a review

2012-02-15 Thread Mark Shannon
reckon PyPy might be able to call clock_gettime() in a tight loop almost as frequently as the C program (although not with the overhead of converting to a decimal). Cheers, Mark. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mai

Re: [Python-Dev] cpython (3.2): remove unused import

2012-02-15 Thread Mark Lawrence
mething completely different. -- Cheers. Mark Lawrence. ___ 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-archive.com

Re: [Python-Dev] PEP for new dictionary implementation

2012-02-17 Thread Mark Shannon
On 16/02/12 20:45, Antoine Pitrou wrote: On Wed, 08 Feb 2012 19:18:14 + Mark Shannon wrote: Proposed PEP for new dictionary implementation, PEP 410? is attached. So, I'm running a few benchmarks using Twisted's test suite (see https://bitbucket.org/pitrou/t3k/wiki/Home). At

Re: [Python-Dev] A new dictionary implementation

2012-02-17 Thread Mark Shannon
On 15/02/12 21:09, Yury Selivanov wrote: Hello Mark, First, I've back-ported your patch on python 3.2.2 (which was relatively easy). Almost all tests pass, and those that don't are always failing on my machine if I remember. The patch can be found here: http://goo.gl/nSzzY Then,

Re: [Python-Dev] PEP for new dictionary implementation

2012-02-17 Thread Mark Shannon
tra index will never make the allocation larger than > the current code. The dict already has a field indicating how many items are in use, the ma_used field. Cheers, Mark. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailma

Re: [Python-Dev] dll name for embedding?

2012-02-17 Thread Mark Hammond
uthors of the extensions you want to use opting in. As mentioned above, please followup on python-list. Cheers, Mark. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.pytho

[Python-Dev] Status of PEP 397 - Python launcher for Windows

2012-02-17 Thread Mark Hammond
versions - I'm happy to try and help with that, but will probably need some help from Martin. * Write some user-oriented docs. Thoughts or comments? Mark ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/py

Re: [Python-Dev] Status of PEP 397 - Python launcher for Windows

2012-02-17 Thread Mark Hammond
On 18/02/2012 4:37 PM, Brian Curtin wrote: On Fri, Feb 17, 2012 at 23:24, Mark Hammond wrote: I'm wondering what thoughts are on PEP 397, the Python launcher for Windows. I've been using the implementation for a number of months now and I find it incredibly useful. To my mind, th

Re: [Python-Dev] Status of PEP 397 - Python launcher for Windows

2012-02-18 Thread Mark Hammond
On 18/02/2012 11:08 PM, mar...@v.loewis.de wrote: Zitat von Mark Hammond : I'm wondering what thoughts are on PEP 397, the Python launcher for Windows. I've been using the implementation for a number of months now and I find it incredibly useful. I wonder what the rationale for t

Re: [Python-Dev] Status of PEP 397 - Python launcher for Windows

2012-02-20 Thread Mark Lawrence
On 18/02/2012 05:24, Mark Hammond wrote: I'm wondering what thoughts are on PEP 397, the Python launcher for Windows. I've been using the implementation for a number of months now and I find it incredibly useful. To my mind, the specific steps would be: * Have someone pronounce it a

Re: [Python-Dev] PEP czar for PEP 3144?

2012-02-20 Thread Mark Lawrence
isition. :-) How about Big Brother then? As anyone worked in room 101? -- Cheers. Mark Lawrence. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/opt

Re: [Python-Dev] Status of PEP 397 - Python launcher for Windows

2012-02-20 Thread Mark Hammond
On 21/02/2012 2:54 AM, Mark Lawrence wrote: On 18/02/2012 05:24, Mark Hammond wrote: ... * Write some user-oriented docs. The section in the docs "Using Python on Windows" would need to be updated, but would this have to happen for every current version of Python? I'm not

Re: [Python-Dev] Status of PEP 397 - Python launcher for Windows

2012-02-20 Thread Mark Lawrence
On 20/02/2012 23:48, Mark Hammond wrote: On 21/02/2012 2:54 AM, Mark Lawrence wrote: The section in the docs "Using Python on Windows" would need to be updated, but would this have to happen for every current version of Python? I'm not sure what docs you are referring to he

Re: [Python-Dev] Status of PEP 397 - Python launcher for Windows

2012-02-21 Thread Mark Hammond
On 22/02/2012 2:50 AM, Vinay Sajip wrote: Mark Hammond gmail.com> writes: think there is something that could be added to those docs - the use of PATHEXT and the fact that once the shebang line is in place, a command-prompt could do just "hello.py" rather than needing "

[Python-Dev] Exceptions in LOAD_GLOBAL and LOAD_NAME

2012-02-23 Thread Mark Shannon
The code below causes different behaviour for LOAD_GLOBAL and LOAD_NAME. Which is correct? Should exceptions raised in the equality test be converted to a NameError or just propogated? Cheers, Mark. - import sys class S(str): pass def eq_except(self

Re: [Python-Dev] Exceptions in LOAD_GLOBAL and LOAD_NAME

2012-02-23 Thread Mark Shannon
Nick Coghlan wrote: On Thu, Feb 23, 2012 at 8:12 PM, Mark Shannon wrote: Should exceptions raised in the equality test be converted to a NameError or just propogated? Our general trend has been towards letting such exceptions escape the operation that caused them rather than implicitly

Re: [Python-Dev] Status regarding Old vs. Advanced String Formating

2012-02-24 Thread Mark Lawrence
opers and users who are in a far better situation to judge this situation than I am. -- Cheers. Mark Lawrence. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/m

Re: [Python-Dev] Status regarding Old vs. Advanced String Formating

2012-02-25 Thread Mark Lawrence
On 25/02/2012 05:55, Nick Coghlan wrote: On Sat, Feb 25, 2012 at 10:23 AM, Mark Lawrence wrote: Quoting the docs http://docs.python.org/py3k/library/stdtypes.html 4.6.2. Old String Formatting Operations Note The formatting operations described here are obsolete and may go away in future

Re: [Python-Dev] Status regarding Old vs. Advanced String Formating

2012-02-25 Thread Mark Lawrence
On 25/02/2012 13:13, Mark Lawrence wrote: On 25/02/2012 05:55, Nick Coghlan wrote: On Sat, Feb 25, 2012 at 10:23 AM, Mark Lawrence wrote: Quoting the docs http://docs.python.org/py3k/library/stdtypes.html 4.6.2. Old String Formatting Operations Note The formatting operations described

Re: [Python-Dev] Status regarding Old vs. Advanced String Formating

2012-02-25 Thread Mark Lawrence
On 25/02/2012 20:16, Mark Lawrence wrote: On 25/02/2012 13:13, Mark Lawrence wrote: On 25/02/2012 05:55, Nick Coghlan wrote: On Sat, Feb 25, 2012 at 10:23 AM, Mark Lawrence wrote: Quoting the docs http://docs.python.org/py3k/library/stdtypes.html 4.6.2. Old String Formatting Operations

Re: [Python-Dev] cpython (3.2): Issue #14123: Explicitly mention that old style % string formatting has caveats

2012-02-26 Thread Mark Lawrence
- should this be a property of the logger or of the call? Just thinking out loud that a tool along the lines of 2to3 aimed specifically at changing string formatting would be some encouragement for people to switch. Maybe a project for someone b

Re: [Python-Dev] Add a frozendict builtin type

2012-02-28 Thread Mark Shannon
hat you haven't mentioned so far is communication between concurrent processes/tasks. These need to be able to copy objects without changing reference semantics, which demands immutability. Cheers, Mark. ___ Python-Dev mailing list Python-Dev@python.org ht

Re: [Python-Dev] Add a frozendict builtin type

2012-02-28 Thread Mark Shannon
rence semantics. To ensure these are the same, the objects used in communication must be immutable. Cheers, Mark. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/op

Re: [Python-Dev] Add a frozendict builtin type

2012-02-28 Thread Mark Shannon
table (at the C level) is quite easy with my new implementation. Cheers, Mark. ___ 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%4

Re: [Python-Dev] Add a frozendict builtin type

2012-02-28 Thread Mark Shannon
#x27;t think sending patches to this mailing list is the way to do this. Would you mind taking a look at how your code interacts with PEP 412. Cheers, Mark. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-de

Re: [Python-Dev] Add a frozendict builtin type

2012-03-01 Thread Mark Janssen
t nothing your trying to conceal. It's like a dog who plays dead: by being totally open you're actually more secure mark ___ 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-archive.com

[Python-Dev] Defending against stack overflow (was Sandboxing Python)

2012-03-04 Thread Mark Shannon
nservative estimate is easy to do. A different approach is to separate the Python stack from the C stack, like stackless. This is a much more elegant approach, but is also a *lot* more work. I think it is a reasonable aim for 3.3 that Lib/test/crashers

Re: [Python-Dev] Sandboxing Python

2012-03-04 Thread Mark Shannon
" message, and more generally to exploit issues that are dismissed by pysandbox as irrelevant.) Using too much memory can be dealt with at one place (in the allocator). You can't solve the too much time, without solving the halting problem, but you can make sure all code is

[Python-Dev] Remove f_yieldfrom attribute from frameobject

2012-03-05 Thread Mark Shannon
Could we remove the f_yieldfrom attribute from frameobject (at the Python level) before it is too late and we are stuck with it. Issue (with patch) here: http://bugs.python.org/issue13970 Cheers, Mark. ___ Python-Dev mailing list Python-Dev@python.org

[Python-Dev] Exceptions in comparison operators

2012-03-05 Thread Mark Shannon
behave like arithmetic and raise an exception. Cheers, Mark ___ 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-archive.com

[Python-Dev] Adding a builtins parameter to eval(), exec() and __import__().

2012-03-07 Thread Mark Shannon
ext of all code would be easier to determine. Currently, it is impossible to allow one function access to sensitive functions like open(), while denying it to others, as any code can then get the builtins of another function via f.__globals__['builtins__']. Separating

Re: [Python-Dev] problem with recursive "yield from" delegation

2012-03-08 Thread Mark Shannon
orm all yields within the interpreter. A simpler implementation is likely to be a more reliable one. Finally, the PEP itself makes no mention of coroutines, stackless or greenlet in the alternatives or criticisms section. Perhaps it should. Cheers, Mark. *Tes

Re: [Python-Dev] Adding a builtins parameter to eval(), exec() and __import__().

2012-03-08 Thread Mark Shannon
Jim J. Jewett wrote: http://mail.python.org/pipermail/python-dev/2012-March/117395.html Brett Cannon posted: [in reply to Mark Shannon's suggestion of adding a builtins parameter to match locals and globals] It's a mess right now to try to grab the __import__() implementation and

Re: [Python-Dev] Adding a builtins parameter to eval(), exec() and __import__().

2012-03-08 Thread Mark Shannon
Nick Coghlan wrote: On Thu, Mar 8, 2012 at 10:06 PM, Mark Shannon wrote: I don't think it cleans up import, but I'll defer to Brett on that. I've included __import__() along with exec and eval as it is a place where new namespaces can be introduced into an execution. There

Re: [Python-Dev] problem with recursive "yield from" delegation

2012-03-08 Thread Mark Shannon
Nick Coghlan wrote: On Thu, Mar 8, 2012 at 9:52 PM, Mark Shannon wrote: First of all, the semantics described in the PEP do not match the tests. If you substitute the supposedly semantically equivalent code based on normal yields for each yield from in the test code (Lib/test/test_pep380.py

[Python-Dev] Request for clarification of PEP 380

2012-03-08 Thread Mark Shannon
of the PEP seems to implicitly assume that all sub-iterators will be generators, so it is not clear on the above points. Cheers, Mark. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscr

Re: [Python-Dev] Request for clarification of PEP 380

2012-03-08 Thread Mark Shannon
Nick Coghlan wrote: On Fri, Mar 9, 2012 at 12:06 AM, Mark Shannon wrote: The text of the PEP seems to implicitly assume that all sub-iterators will be generators, so it is not clear on the above points. On the contrary, this question is explicitly addressed in the PEP: http://www.python.org

[Python-Dev] PEP

2012-03-08 Thread Mark Janssen
On Thu, Feb 9, 2012 at 5:18 PM, Guido van Rossum wrote: > A dictionary would (then) be a SET of these. (Voila! things have already >> gotten simplified.) >> > > Really? So {a:1, a:2} would be a dict of length 2? > Eventually, I also think this will seque and in

Re: [Python-Dev] Adding a builtins parameter to eval(), exec() and __import__().

2012-03-09 Thread Mark Shannon
tible way. exec, eval and __import__ would all gain an optional (keyword-only?) "builtins" parameter. I see no reason to change any of the C API functions. New functions taking an extra parameter could be added, but it wouldn't be a requirement. Cheers, Mark __

<    7   8   9   10   11   12   13   14   >