Re: [Python-Dev] Arbitrary non-identifier string keys when using **kwargs

2018-10-12 Thread Samuele Pedroni
On Thu, Oct 4, 2018 at 10:58 AM Steven D'Aprano wrote: > While keyword arguments have to be identifiers, using **kwargs allows > arbitrary strings which aren't identifiers: > > py> def spam(**kwargs): > ... print(kwargs) > ... > py> spam(**{"something arbitrary": 1, '\n': 2}) > {'something

Re: [Python-Dev] Challenge: Please break this! [Now with blog post]

2009-02-28 Thread Samuele Pedroni
Guido van Rossum wrote: On Mon, Feb 23, 2009 at 3:16 PM, Martin v. Löwis mar...@v.loewis.de wrote: Don't I remember the previous restricted module dying a similar death of 1,000 cuts before it was concluded to be unsafe at any height and abandoned? I think you are slightly

Re: [Python-Dev] Reviving restricted mode?

2009-02-22 Thread Samuele Pedroni
Guido van Rossum wrote: I've received some enthusiastic emails from someone who wants to revive restricted mode. He started out with a bunch of patches to the CPython runtime using ctypes, which he attached to an App Engine bug: http://code.google.com/p/googleappengine/issues/detail?id=671

Re: [Python-Dev] To 3.0.2 or not to 3.0.2?

2009-02-17 Thread Samuele Pedroni
Victor Stinner wrote: Le Tuesday 17 February 2009 08:52:20 Lennart Regebro, vous avez écrit : On Tue, Feb 17, 2009 at 00:50, Guido van Rossum gu...@python.org wrote: Can you explain the difficulty with porting setuptools in more detail? Oh, it just exposes a bug in distutils.

Re: [Python-Dev] PEP 8: Discourage named lambdas?

2008-05-03 Thread Samuele Pedroni
Terry Reedy wrote: Some people write somename = lambda args: expression instead of the more obvious (to most people) and, dare I say, standard def somename(args): return expression The difference in the result (the only one I know of) is that the code and function objects get the

Re: [Python-Dev] PEP 8: Discourage named lambdas?

2008-05-03 Thread Samuele Pedroni
Nick Coghlan wrote: Samuele Pedroni wrote: I found only an example in my personal recent code: START = !-- *db-payload-start* -- END = !-- *db-payload-end* -- TITLEPATTERN = lambda s: title%s/title % s this three are later used in a very few .find() and .replace() expressions in the same

[Python-Dev] pypy-0.99.0: new object spaces, optimizations, configuration ...

2007-02-17 Thread Samuele Pedroni
team, Samuele Pedroni, Carl Friedrich Bolz, Armin Rigo, Michael Hudson, Maciej Fijalkowski, Anders Chrigstroem, Holger Krekel, Guido Wesdorp and many others: http://codespeak.net/pypy/dist/pypy/doc/contributor.html What is PyPy? Technically

Re: [Python-Dev] Fwd: survey about the use of agile practices

2006-12-24 Thread Samuele Pedroni
Aahz wrote: On Sun, Dec 24, 2006, Guido van Rossum wrote: Anyone? It was discarded as probable spam by me due to the lack of a valid To: line. Do you have any particular reason for believing that it's real? http://agile.diee.unica.it/uras.html (it's in italian) seems to make

Re: [Python-Dev] Using SCons for cross-compilation

2006-11-09 Thread Samuele Pedroni
Barry Warsaw wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Nov 9, 2006, at 2:15 PM, [EMAIL PROTECTED] wrote: Martin In any case, the patch being contributed uses SCons. If people Martin think this is unmaintainable, this is a reason to reject the Martin

Re: [Python-Dev] Import semantics

2006-07-06 Thread Samuele Pedroni
. Is *that* official? It is official, at least in the unofficial way that Jython appears to work: Brian handed the baton to me after (I presume) Samuele Pedroni had handed the baton to Brian. Brian's email is here: http://sourceforge.net/mailarchive/message.php?msg_id=13859029 That said, I still

Re: [Python-Dev] doc for new restricted execution design for Python

2006-07-01 Thread Samuele Pedroni
Brett Cannon wrote: I don't know how JavaScript is doing it yet. The critical thing for me for this month was trying to come up with a security model. And if you don't think it is going to scale, how do you think it should be done? if I remember correctly, the boundary/granularity of

[Python-Dev] Reminder: call for proposals Python Language and Libraries Track for Europython 2006

2006-05-18 Thread Samuele Pedroni
and submission links are at: http://www.europython.org/sections/tracks_and_talks/call-for-proposals Samuele Pedroni, Python Language and Libraries Track Chair ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev

[Python-Dev] Reminder: call for proposals Python Language and Libraries Track for Europython 2006

2006-05-02 Thread Samuele Pedroni
://www.europython.org/sections/tracks_and_talks/call-for-proposals Thanks, Samuele Pedroni ___ 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

Re: [Python-Dev] Class decorators

2006-03-28 Thread Samuele Pedroni
Mike Krell wrote: Greg Ewing greg.ewing at canterbury.ac.nz writes: I've just been playing around with metaclasses, and I think I've stumbled across a reason for having class decorators as an alternative to metaclasses for some purposes. There has also been discussion on the

[Python-Dev] Next PyPy Sprint: Tokyo 23/4 - 29/4

2006-03-27 Thread Samuele Pedroni
Tokyo PyPy Sprint: 23rd - 29th April 2006 The next PyPy sprint is scheduled to take place 23rd- 29th April 2006 (Sunday-Saturday) in Akihabara, Tokyo, Japan. We will together with FSIJ (Free Software Initiative of Japan) aim to promote

Re: [Python-Dev] GeneratorExit inheriting from Exception

2006-03-18 Thread Samuele Pedroni
Barry Warsaw wrote: On Sat, 2006-03-18 at 22:53 +1000, Nick Coghlan wrote: Should GeneratorExit inherit from Exception or BaseException? Actually, this prompts me to write about an issue I have with PEP 352. I actually don't think it's necessary (yes, I know it's already in the tree).

Re: [Python-Dev] Threading idea -- exposing a global thread lock

2006-03-14 Thread Samuele Pedroni
Raymond Hettinger wrote: [Samuele Pedroni] there's no sys.checkinterval in Jython. Implementing this would need the introduction of some kind of GIL implementation in Jython, the JVM has no primitive for global critical sections. Wouldn't Java implement this directly by suspending

Re: [Python-Dev] Making builtins more efficient

2006-03-13 Thread Samuele Pedroni
Phillip J. Eby wrote: At 02:47 PM 3/13/2006 -0500, Jim Jewett wrote: Paul Moore wrote: Is there any practical way of detecting and flagging constructs like the above (remotely shadowing a builtin in another module)? Phillip J. Eby wrote: the patch ended up being backed out ... too strict of

Re: [Python-Dev] Threading idea -- exposing a global thread lock

2006-03-13 Thread Samuele Pedroni
Raymond Hettinger wrote: it doesn't translate reasonably to Jython or IronPython, it's really tricky to implement, FWIW, someone on the newsgroup suggested implementing this via a slight modification to sys.checkinterval(). The idea was that a None argument would translate to

Re: [Python-Dev] PEP for Better Control of Nested Lexical Scopes

2006-02-22 Thread Samuele Pedroni
Almann T. Goo wrote: As far as I remember, Guido wasn't particularly opposed to the idea, but the discussion fizzled out after having failed to reach a consensus on an obviously right way to go about it. My apologies for bringing this debated topic again to the front-lines--that said, I

Re: [Python-Dev] PEP for Better Control of Nested Lexical Scopes

2006-02-22 Thread Samuele Pedroni
Greg Ewing wrote: Jeremy Hylton wrote: The names of naming statements are quite hard to get right, I fear. My vote goes for 'outer'. And if this gets accepted, remove 'global' in 3.0. In 3.0 we could remove 'global' even without 'outer', and make module global scopes read-only, not

Re: [Python-Dev] Draft proposal: Implicit self in Python 3.0

2006-01-08 Thread Samuele Pedroni
Ralf W. Grosse-Kunstleve wrote: --- Fredrik Lundh [EMAIL PROTECTED] wrote: Please try the code below to see the performance impact. oh, please. do you seriously think that if you don't have to type self yourself, Python will suddenly be able to turn all instance variables into local function

Re: [Python-Dev] Draft proposal: Implicit self in Python 3.0

2006-01-08 Thread Samuele Pedroni
Ian Bicking wrote: Tim Peters wrote: [Thomas Wouters] My point isn't that it isn't archived somewhere (mailinglists, wiki, FAQ, the minds of many, many people, not just Python developers) but that it isn't easily findable and it isn't easily accessible in a single location. I thought PEP's

Re: [Python-Dev] Draft proposal: Implicit self in Python 3.0

2006-01-08 Thread Samuele Pedroni
Ian Bicking wrote: I just don't want people to feel discouraged when they try to contribute to the Python community and a PEP 13 could help direct people towards areas where their contributions are more likely to be useful. but people have a lot of options, probably more effective, ranging

[Python-Dev] some interesting readings

2006-01-07 Thread Samuele Pedroni
because I was reminded of them recently, because they may be useful landmarks in the prospective of future discussions, because expanding one's understanding of the problem/solution space of language design is quite a good thing if one is interested in such things... 1) Gilad Bracha. Pluggable

Re: [Python-Dev] a quit that actually quits

2005-12-29 Thread Samuele Pedroni
Michael Chermside wrote: The F-bot writes: in reality, some things are carefully thought out and craftily im- plemented, some things are engineering tradeoffs made at a certain time, and some things are just accidents -- but python-dev will happily defend the current solution with the same

Re: [Python-Dev] a quit that actually quits

2005-12-28 Thread Samuele Pedroni
Michael Hudson wrote: [EMAIL PROTECTED] writes: Fredrik a quit/exit command that actually quits, instead of printing a Fredrik you didn't say please! message. I like Fredrik's idea more and more. The thing that bothers me about it is that the standard way you tell python to do

Re: [Python-Dev] status of development documentation

2005-12-24 Thread Samuele Pedroni
Tim Peters wrote: [Neal] Hmmm, I thought others were running the tests on Windows too. There was one report on Nov 22 about running Purify on Windows 2k (subject: ast status, memory leaks, etc). He had problems with a stack overflow in test_compile. He was going to disable the test and

[Python-Dev] Next PyPy Sprint: Palma de Mallorca (Spain) 23rd - 29th January 2006

2005-12-21 Thread Samuele Pedroni
Palma de Mallorca PyPy Sprint: 23rd - 29th January 2006 The next PyPy sprint is scheduled to take place January 2006 in Palma De Mallorca, Balearic Isles, Spain. We'll give newcomer-friendly introductions and the focus will mainly

Re: [Python-Dev] For Python 3k, drop default/implicit hash, and comparison

2005-11-26 Thread Samuele Pedroni
Noam Raphael wrote: Three weeks ago, I read this and thought, well, you have two options for a default comparison, one based on identity and one on value, both are useful sometimes and Guido prefers identity, and it's OK. But today I understood that I still think otherwise. well, this still

Re: [Python-Dev] Why should the default hash(x) == id(x)?

2005-11-05 Thread Samuele Pedroni
Noam Raphael wrote: On 11/5/05, Martin v. Löwis [EMAIL PROTECTED] wrote: More generally, I claim that the current behaviour is better than *any* alternative. To refute this claim, you would have to come up with an alternative first. The alternative is to drop the __hash__ method of

Re: [Python-Dev] a different kind of reduce...

2005-11-01 Thread Samuele Pedroni
Reinhold Birkenfeld wrote: Raymond Hettinger wrote: [Martin Blais] I'm always--literally every time-- looking for a more functional form, something that would be like this: # apply dirname() 3 times on its results, initializing with p ... = repapply(dirname, 3, p) [Greg Ewing] Maybe

Re: [Python-Dev] [Jython-dev] Re: AST branch is in?

2005-10-25 Thread Samuele Pedroni
Frank Wierzbicki wrote: On 10/20/05, *Neal Norwitz* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: The Grammar is (was at one point at least) shared between Jython and would allow more tools to be able to share infrastructure. The idea is to eventually be able to have

Re: [Python-Dev] AST branch is in?

2005-10-25 Thread Samuele Pedroni
Guido van Rossum wrote: On 10/25/05, Frank Wierzbicki [EMAIL PROTECTED] wrote: My name is Frank Wierzbicki and I'm working on the Jython project. Does anyone on this list know more about the history of this Grammar sharing between the two projects? I've heard about some Grammar sharing

Re: [Python-Dev] Deprecating builtin id (and moving it to sys())

2005-08-17 Thread Samuele Pedroni
Jeremy Hylton wrote: I'd like to see the builtin id() removed so that I can use it as a local variable name without clashing with the builtin name. I certainly use the id() function, but not as often as I have a local variable I'd like to name id. The sys module seems like a natural place

Re: [Python-Dev] __traceback__ and reference cycles

2005-08-09 Thread Samuele Pedroni
Tim Peters wrote: I can't think of a Python feature with a higher aggregate braincell_burned / benefit ratio than __del__ methods. If P3K retains them-- or maybe even before --we should consider taking the Java dodge on this one. That is, decree that henceforth a __del__ method will get

[Python-Dev] Next PyPy sprint: Heidelberg (Germany), 22nd-29th of August

2005-07-30 Thread Samuele Pedroni
-people.html .. _`PyPy sprint mailing list`: http://codespeak.net/mailman/listinfo/pypy-sprint -- Samuele Pedroni the PyPy team ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http

[Python-Dev] Python Language track at Europython, still possibilities to submit talks

2005-05-04 Thread Samuele Pedroni
/sections/tracks_and_talks/propose_a_talk/ http://www.europython.org Regards, Samuele Pedroni, Python Language Track chair. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http

Re: [Python-Dev] Re: anonymous blocks

2005-04-27 Thread Samuele Pedroni
Jim Fulton wrote: Duncan Booth wrote: Jim Fulton [EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: Guido van Rossum wrote: I've written a PEP about this topic. It's PEP 340: Anonymous Block Statements (http://python.org/peps/pep-0340.html). Some observations: 1. It looks to me like a bare return

Re: [Python-Dev] defmacro (was: Anonymous blocks)

2005-04-25 Thread Samuele Pedroni
Robert Brewer wrote: Shane Hathaway wrote: Robert Brewer wrote: So currently, all subclasses just override __set__, which leads to a *lot* of duplication of code. If I could write the base class' __set__ to call macros like this: def __set__(self, unit, value): self.begin() if

Re: [Python-Dev] Re: Re: anonymous blocks

2005-04-21 Thread Samuele Pedroni
Fredrik Lundh wrote: Regardless, I believe that solving generator finalization (calling all enclosing finally blocks in the generator) is a worthwhile problem to solve. Whether that be by PEP 325, 288, 325+288, etc., that should be discussed. Whether people use it as a pseudo-block, or decide

Re: [Python-Dev] Security capabilities in Python

2005-04-09 Thread Samuele Pedroni
Ka-Ping Yee wrote: On Sat, 9 Apr 2005, Jp Calderone wrote: Does using the gc module to bypass this security count? If so: [EMAIL PROTECTED]:~$ python -i facet.py import gc c = readonly_facet.__getattr__.func_closure[1] r = gc.get_referents(c)[0] r.n = 'hax0r3d'

Re: [Python-Dev] Pickling instances of nested classes

2005-04-01 Thread Samuele Pedroni
Walter Dörwald wrote: Samuele Pedroni wrote: [...] And having the full name of the class available would certainly help in debugging. that's probably the only plus point but the names would be confusing wrt modules vs. classes. You'd propably need a different separator in repr. XIST does

Re: [Python-Dev] Pickling instances of nested classes

2005-03-31 Thread Samuele Pedroni
Walter Dörwald wrote: Samuele Pedroni wrote: Walter Dörwald wrote: [User cases for pickling instances of nested classes] So is this change wanted? useful? implementable with reasonable effort? Or just not worth it? notice that in this cases often metaclasses are involved or could easely be, so

Re: [Python-Dev] Pickling instances of nested classes

2005-03-29 Thread Samuele Pedroni
Walter Dörwald wrote: For XML: 1) Those classes are the element types and the nested classes are the attributes. 2) Being able to define those attributes as separate classes makes it possible to implement custom functionality (e.g. for validation or for handling certain attribute types like URLs,

Re: [Python-Dev] code blocks using 'for' loops and generators

2005-03-16 Thread Samuele Pedroni
Josiah Carlson wrote: Greg Ewing [EMAIL PROTECTED] wrote: Josiah Carlson wrote: Since PEP 310 was already mentioned, can we just say that the discussion can be boiled down to different ways of spelling __enter__/__exit__ from PEP 310? It's not quite the same thing. PEP 310 suggests a mechanism

Re: [Python-Dev] code blocks using 'for' loops and generators

2005-03-15 Thread Samuele Pedroni
Brian Sabbey wrote: Samuele Pedroni wrote: OTOH a suite-based syntax for thunks can likely not work as a substitute of lambda for cases like: f(lambda: ..., ...) where the function is the first argument, and then there are further arguments. I do not see why you say suite-based thunks cannot

Re: [Python-Dev] RE: code blocks using 'for' loops and generators

2005-03-15 Thread Samuele Pedroni
Jim Jewett wrote: It may be time to PEP (or re-PEP), if only to clarify what people are actually asking for. Brian Sabbey's example from message http://mail.python.org/pipermail/python-dev/2005-March/052202.html *seems* reasonably clear, but I don't see how it relates in any way to for loops or

Re: [Python-Dev] Adding any() and all()

2005-03-11 Thread Samuele Pedroni
Peter Astrand wrote: On Fri, 11 Mar 2005, Paul Moore wrote: Not sure this is pertinent but anyway: any and all are often used as variable names. all especially often and then almost always as a list of something. It would not be good to add all to the list of words to watch out for. Also, all

Re: [Python-Dev] PEP 309 enhancements

2005-02-27 Thread Samuele Pedroni
Nick Coghlan wrote: The initial suggestion was to provide a __get__ method on partial objects, which forces the insertion of the reference to self at the beginning of the argument list instead of at the end: def __get__(self, obj, type=None): if obj is None: return self