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
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
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
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
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
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
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
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@
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
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-
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
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
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
+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
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
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
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
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
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
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
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
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
- 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
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
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,
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/
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
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
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
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,
. 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
"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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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/
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
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
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
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
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
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:
(
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.
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
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
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
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
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
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
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
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,
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
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
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
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
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
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
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
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
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
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 "
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
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
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
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
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
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
- 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
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
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
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
#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
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
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
" 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
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
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
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
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
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
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
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
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
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
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
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
__
1101 - 1200 of 1370 matches
Mail list logo