Re: pre-PEP: The create statement

2006-04-11 Thread Steven Bethard
John J. Lee wrote: > "Michele Simionato" <[EMAIL PROTECTED]> writes: > [...] >> This agrees with my scan (except I also found an occurrence of 'create' >> in Tkinter). >> BTW, I would be curious to see the script you are using for the >> scanning. Are you >> using tokenize too? In am quite fond of

Re: pre-PEP: The create statement

2006-04-11 Thread John J. Lee
"Michele Simionato" <[EMAIL PROTECTED]> writes: [...] > This agrees with my scan (except I also found an occurrence of 'create' > in Tkinter). > BTW, I would be curious to see the script you are using for the > scanning. Are you > using tokenize too? In am quite fond of the tokenize module ;) Havi

Re: updated pre-PEP: The create statement

2006-04-11 Thread Steven Bethard
Michele Simionato wrote: > Peter Hansen wrote: >> Michele Simionato wrote: >> > You can pull out the example in the official >>> PEP, if you like. >> Please do. If this is supposed to have anything to do with namespaces, >> it has nothing to do with the type of data structures XML is capable of >

Re: updated pre-PEP: The create statement

2006-04-11 Thread Michele Simionato
Peter Hansen wrote: > Michele Simionato wrote: > > You can pull out the example in the official > > PEP, if you like. > > Please do. If this is supposed to have anything to do with namespaces, > it has nothing to do with the type of data structures XML is capable of > and the presence of this exa

Re: updated pre-PEP: The create statement

2006-04-11 Thread Peter Hansen
Michele Simionato wrote: > Honestly, I don't want the 'create' statement to be used to write XML > in Python. > I think this would be a misuse of the functionality. OTOH I believe > that the main selling point for the 'create' statements is that it make > it easy to implement declarative minilangua

Re: updated pre-PEP: The create statement

2006-04-11 Thread Michele Simionato
Steven Bethard wrote: > Azolex wrote: > > Steven Bethard wrote: > >> and named, nested hierarchies like XML documents could be created > >> like:: > >> > >> create ETobject html: > >> "This statement would generate an ElementTree object" > >> > >> create ETobject head: > >>

Re: updated pre-PEP: The create statement

2006-04-11 Thread Michele Simionato
Steven Bethard wrote: > Azolex wrote: > > Steven Bethard wrote: > >> and named, nested hierarchies like XML documents could be created > >> like:: > >> > >> create ETobject html: > >> "This statement would generate an ElementTree object" > >> > >> create ETobject head: > >>

Re: updated pre-PEP: The create statement

2006-04-11 Thread Michele Simionato
Steven Bethard wrote: > Azolex wrote: > > Steven Bethard wrote: > >> and named, nested hierarchies like XML documents could be created > >> like:: > >> > >> create ETobject html: > >> "This statement would generate an ElementTree object" > >> > >> create ETobject head: > >>

Re: updated pre-PEP: The create statement

2006-04-11 Thread Michele Simionato
Steven Bethard wrote: > Azolex wrote: > > Steven Bethard wrote: > >> and named, nested hierarchies like XML documents could be created > >> like:: > >> > >> create ETobject html: > >> "This statement would generate an ElementTree object" > >> > >> create ETobject head: > >>

Re: updated pre-PEP: The create statement

2006-04-11 Thread Michele Simionato
Steven Bethard wrote: > Azolex wrote: > > Steven Bethard wrote: > >> and named, nested hierarchies like XML documents could be created > >> like:: > >> > >> create ETobject html: > >> "This statement would generate an ElementTree object" > >> > >> create ETobject head: > >>

Re: updated pre-PEP: The create statement

2006-04-10 Thread Michael Spencer
Steven Bethard wrote: > Azolex wrote: >> Steven Bethard wrote: >>> and named, nested hierarchies like XML documents could be created >>> like:: >>> >>> create ETobject html: >>> "This statement would generate an ElementTree object" >>> >>> create ETobject head: >>> "

Re: updated pre-PEP: The create statement

2006-04-10 Thread Steven Bethard
Azolex wrote: > Steven Bethard wrote: >> and named, nested hierarchies like XML documents could be created >> like:: >> >> create ETobject html: >> "This statement would generate an ElementTree object" >> >> create ETobject head: >> "generate the head" >>

Re: updated pre-PEP: The create statement

2006-04-10 Thread Azolex
Steven Bethard wrote: > I've updated the PEP based on a number of comments on comp.lang.python. > The most updated versions are still at: > > http://ucsu.colorado.edu/~bethard/py/pep_create_statement.txt > http://ucsu.colorado.edu/~bethard/py/pep_create_statement.html > > In this post, I

Re: updated pre-PEP: The create statement

2006-04-07 Thread Steven Bethard
Carl Banks wrote: > Steven Bethard wrote: >> I've updated the PEP based on a number of comments on comp.lang.python. >> The most updated versions are still at: >> >> http://ucsu.colorado.edu/~bethard/py/pep_create_statement.txt >> http://ucsu.colorado.edu/~bethard/py/pep_create_statement.

Re: pre-PEP: The create statement

2006-04-07 Thread skip
Michele> I think looking at the occurrences in the standard library only Michele> is unfair. In addition, when considering the standard library you need to search the source repository, not just what's installed on your platform. I noticed in your earlier post that you pointed your count

Re: pre-PEP: The create statement

2006-04-07 Thread [EMAIL PROTECTED]
Serge Orlov wrote: > bruno at modulix wrote: > > Steven Bethard wrote: > > > The PEP below should be mostly self explanatory. I'll try to keep the > > > most updated versions available at: > > [snip] > > > > > Seems mostly clean. +1. > > > > That's what Trojans said when they saw a wooden horse at

Re: pre-PEP: The create statement

2006-04-07 Thread Michele Simionato
I think looking at the occurrences in the standard library only is unfair. I have a large "Zope +Plone+my stuff" installation and I get 154 occurrences of 'create' but nearly 0 occurrences of 'make' (only a few in Zope/lib/python/BTrees/tests/testSetOps.py). I guess 'make' sounds too Lispy, this i

Re: updated pre-PEP: The create statement

2006-04-06 Thread Carl Banks
Steven Bethard wrote: > I've updated the PEP based on a number of comments on comp.lang.python. > The most updated versions are still at: > > http://ucsu.colorado.edu/~bethard/py/pep_create_statement.txt > http://ucsu.colorado.edu/~bethard/py/pep_create_statement.html > > In this post, I'

Re: updated pre-PEP: The create statement

2006-04-06 Thread Steven Bethard
[EMAIL PROTECTED] wrote: > Steven> Optional Extensions > Steven> === > > Steven> Remove the create keyword > Steven> - > > Steven> It might be possible to remove the create keyword so that such > Steven> statements would begin with t

Re: updated pre-PEP: The create statement

2006-04-06 Thread skip
Steven> Optional Extensions Steven> === Steven> Remove the create keyword Steven> - Steven> It might be possible to remove the create keyword so that such Steven> statements would begin with the callable being called, e.g.:: Ste

Re: pre-PEP: The create statement

2006-04-06 Thread Ben Cartwright
Michael Ekstrand wrote: > Is there a natural way > to extend this to other things, so that function creation can be > modified? For example: > > create tracer fib(x): > # Return appropriate data here > pass > > tracer could create a function that logs its entry and exit; behavior > could be

Re: pre-PEP: The create statement

2006-04-06 Thread Steven Bethard
Terry Reedy wrote: > "Michele Simionato" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> This is a very relevant question. I would expect the new keyword would >> break lots >> of modules. However measuring is better than speculating. > > Please run also with alternatives, such a

Re: pre-PEP: The create statement

2006-04-06 Thread Terry Reedy
"Michele Simionato" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > This is a very relevant question. I would expect the new keyword would > break lots > of modules. However measuring is better than speculating. Please run also with alternatives, such as 'make'. tjr -- http://

Re: pre-PEP: The create statement

2006-04-06 Thread Terry Reedy
"Azolex" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'd advocate for the shortest possible keyword, and - maybe because > English is not my native language - I'd thus prefer "make" if any is > really required. While currently +0 on the proposal, I am +1 on 'make' versus 'creat

Re: updated pre-PEP: The create statement

2006-04-06 Thread Steven Bethard
Steven Bethard wrote: > I've updated the PEP based on a number of comments on comp.lang.python. > The most updated versions are still at: > > http://ucsu.colorado.edu/~bethard/py/pep_create_statement.txt > http://ucsu.colorado.edu/~bethard/py/pep_create_statement.html > > In this post, I

Re: updated pre-PEP: The create statement

2006-04-06 Thread Steven Bethard
Michele Simionato wrote: > Steven Bethard wrote: >> I've updated the PEP based on a number of comments on comp.lang.python. >> The most updated versions are still at: >> >> http://ucsu.colorado.edu/~bethard/py/pep_create_statement.txt >> http://ucsu.colorado.edu/~bethard/py/pep_create_sta

Re: updated pre-PEP: The create statement

2006-04-06 Thread Michele Simionato
Steven Bethard wrote: > I've updated the PEP based on a number of comments on comp.lang.python. > The most updated versions are still at: > > http://ucsu.colorado.edu/~bethard/py/pep_create_statement.txt > http://ucsu.colorado.edu/~bethard/py/pep_create_statement.html > > In this post, I'

Re: pre-PEP: The create statement

2006-04-06 Thread Steven Bethard
Michele Simionato wrote: > Carl Banks wrote: >>> create module mod: >>> "This creates a sub-module named mod with an f1 function" >>> >>> def f1(): >>> ... >> Let's not do this, really. A module should be one-to-one with a file, >> and you should be able to impo

Re: pre-PEP: The create statement

2006-04-06 Thread Michele Simionato
Carl Banks wrote: > My biggest concern with this is the special arguments of the caller. > It breaks my heart that we couldn't do something like this: > > create dict keymap: > A = 1 > B = 2 > > And it'll probably confuse people as well. We ought to keep that in > mind. > > > > Of course,

updated pre-PEP: The create statement

2006-04-06 Thread Steven Bethard
I've updated the PEP based on a number of comments on comp.lang.python. The most updated versions are still at: http://ucsu.colorado.edu/~bethard/py/pep_create_statement.txt http://ucsu.colorado.edu/~bethard/py/pep_create_statement.html In this post, I'm especially soliciting review of

Re: pre-PEP: The create statement

2006-04-06 Thread Michele Simionato
Sion Arrowsmith wrote: > Michele Simionato <[EMAIL PROTECTED]> wrote: > >Sion Arrowsmith wrote: > >> A quick scan of the standard library suggests that it will have > >> a grand total of 3 modules requiring a fix (it's a method name > >> in imaplib and a named argument in a couple of places in bsdd

xml <-> python Re: pre-PEP: The create statement

2006-04-06 Thread Azolex
Steven Bethard wrote: ... > > Optional Extensions > === > > Remove the create keyword > - > > It might be possible to remove the create keyword so that such > statements would begin with the callable being called, e.g.: > > module mod: > def f

Re: pre-PEP: The create statement

2006-04-06 Thread Steven Bethard
Carl Banks wrote: > Steven Bethard wrote: >> This PEP proposes a generalization of the class-declaration syntax, >> the ``create`` statement. The proposed syntax and semantics parallel >> the syntax for class definition, and so:: >> >> create : >> >> >> is translated into the assignm

Re: pre-PEP: The create statement

2006-04-06 Thread Sion Arrowsmith
Michele Simionato <[EMAIL PROTECTED]> wrote: >Sion Arrowsmith wrote: >> A quick scan of the standard library suggests that it will have >> a grand total of 3 modules requiring a fix (it's a method name >> in imaplib and a named argument in a couple of places in bsddb >> and distutils). Your own cod

Re: pre-PEP: The create statement

2006-04-06 Thread Steven Bethard
Tim N. van der Leeuw wrote: > Could this still make it in Python 2.5 even? If it's pushed hard > enough? I don't know if this has been discussed on the python-dev > mailing lists and what the reactions of python-devs and GvR was? Unlikely. I haven't posted it to python-dev yet, and they've basical

Re: pre-PEP: The create statement

2006-04-06 Thread Ron Adam
> Abstract > > > This PEP proposes a generalization of the class-declaration syntax, > the ``create`` statement. The proposed syntax and semantics parallel > the syntax for class definition, and so:: > >create : > > > is translated into the assignment:: > > = ("", ,

Re: pre-PEP: The create statement

2006-04-06 Thread Michele Simionato
Sion Arrowsmith wrote: > Kay Schluehr <[EMAIL PROTECTED]> wrote: > >Steven Bethard wrote: > >> Python-Version: 2.6 > >Have you a rough estimation how many modules will be broken when > >"create" is introduced as a keyword? > > A quick scan of the standard library suggests that it will have > a gran

Re: pre-PEP: The create statement

2006-04-06 Thread Azolex
Michele Simionato wrote: > Steven Bethard wrote: >> The PEP is based on a suggestion [1]_ from Michele Simionato on the >> python-dev list. > > True, but I would also mention that the idea of the 'create' keyword > come from > Nick Coghlan: > > http://mail.python.org/pipermail/python-dev/2005-Oct

Re: pre-PEP: The create statement

2006-04-06 Thread Sion Arrowsmith
Kay Schluehr <[EMAIL PROTECTED]> wrote: >Steven Bethard wrote: >> Python-Version: 2.6 >Have you a rough estimation how many modules will be broken when >"create" is introduced as a keyword? A quick scan of the standard library suggests that it will have a grand total of 3 modules requiring a fix (

Re: pre-PEP: The create statement

2006-04-06 Thread Michael Ekstrand
Steven Bethard wrote: > Michael Ekstrand wrote: >> Something it could be useful to try to add, if possible: So far, it >> seems that this create block can only create class-like things (objects >> with a name, potentially bases, and a namespace). Is there a natural way >> to extend this to other th

Re: pre-PEP: The create statement

2006-04-06 Thread Steven Bethard
Michael Ekstrand wrote: > Something it could be useful to try to add, if possible: So far, it > seems that this create block can only create class-like things (objects > with a name, potentially bases, and a namespace). Is there a natural way > to extend this to other things, so that function creat

Re: pre-PEP: The create statement

2006-04-06 Thread Michele Simionato
Kay Schluehr wrote: > Steven Bethard wrote: > > > Python-Version: 2.6 > > Have you a rough estimation how many modules will be broken when > "create" is introduced as a keyword? This is a very relevant question. I would expect the new keyword would break lots of modules. However measuring is bette

Re: pre-PEP: The create statement

2006-04-06 Thread Kay Schluehr
Steven Bethard wrote: > Python-Version: 2.6 Have you a rough estimation how many modules will be broken when "create" is introduced as a keyword? -- http://mail.python.org/mailman/listinfo/python-list

Re: pre-PEP: The create statement

2006-04-06 Thread Tim N. van der Leeuw
>From what I read here it would make a huge useability improvement for properties, and for that alone I would vote this a +1 if I were given the right to vote. Could this still make it in Python 2.5 even? If it's pushed hard enough? I don't know if this has been discussed on the python-dev mailing

Re: pre-PEP: The create statement

2006-04-06 Thread Michael Ekstrand
Steven Bethard wrote: > The PEP below should be mostly self explanatory. I'll try to keep the > most updated versions available at: > > http://ucsu.colorado.edu/~bethard/py/pep_create_statement.txt > http://ucsu.colorado.edu/~bethard/py/pep_create_statement.html > > > > PEP: XXX > Ti

Re: pre-PEP: The create statement

2006-04-06 Thread Michael Ekstrand
Carl Banks wrote: > That's probably even more readable than class A, if not as familiar. > My biggest concern with this is the special arguments of the caller. > It breaks my heart that we couldn't do something like this: > > create dict keymap: > A = 1 > B = 2 > Why couldn't you? Maybe

Re: pre-PEP: The create statement

2006-04-06 Thread bruno at modulix
Serge Orlov wrote: > bruno at modulix wrote: > >>Steven Bethard wrote: >> >>>The PEP below should be mostly self explanatory. I'll try to keep the >>>most updated versions available at: > > > [snip] > > >>Seems mostly clean. +1. >> > > > That's what Trojans said when they saw a wooden horse

Re: pre-PEP: The create statement

2006-04-06 Thread Michele Simionato
bruno at modulix wrote: > Seems mostly clean. +1. > > (and I do prefer it with the 'create' statement - more explicit and > readable than Michele's original proposition IMHO). Well, I do agree ;) Actually, Steven's original PEP draft was closer to my original proposal, but I suggested him to prop

Re: pre-PEP: The create statement

2006-04-06 Thread Serge Orlov
bruno at modulix wrote: > Steven Bethard wrote: > > The PEP below should be mostly self explanatory. I'll try to keep the > > most updated versions available at: [snip] > > Seems mostly clean. +1. > That's what Trojans said when they saw a wooden horse at the gates of Troy ;) Serge. -- http

Re: pre-PEP: The create statement

2006-04-06 Thread bruno at modulix
Steven Bethard wrote: > The PEP below should be mostly self explanatory. I'll try to keep the > most updated versions available at: > > http://ucsu.colorado.edu/~bethard/py/pep_create_statement.txt > http://ucsu.colorado.edu/~bethard/py/pep_create_statement.html > > > > PEP: XXX > Title

Re: pre-PEP: The create statement

2006-04-06 Thread Michele Simionato
Steven Bethard wrote: > The PEP is based on a suggestion [1]_ from Michele Simionato on the > python-dev list. True, but I would also mention that the idea of the 'create' keyword come from Nick Coghlan: http://mail.python.org/pipermail/python-dev/2005-October/057531.html Michele Simionato

Re: pre-PEP: The create statement

2006-04-05 Thread Paddy
I wonder if the resulting code would look like Python. It seems a great way to unify how things are defined, but I would not want to mix the syntax with the current style. - Pad. -- http://mail.python.org/mailman/listinfo/python-list

Re: pre-PEP: The create statement

2006-04-05 Thread Carl Banks
Steven Bethard wrote: > This PEP proposes a generalization of the class-declaration syntax, > the ``create`` statement. The proposed syntax and semantics parallel > the syntax for class definition, and so:: > > create : > > > is translated into the assignment:: > > = ("", , ) >

Re: pre-PEP: The create statement

2006-04-05 Thread Paul Rubin
I haven't looked at this enough to really understand it, but it looks interesting and promising. -- http://mail.python.org/mailman/listinfo/python-list

pre-PEP: The create statement

2006-04-05 Thread Steven Bethard
The PEP below should be mostly self explanatory. I'll try to keep the most updated versions available at: http://ucsu.colorado.edu/~bethard/py/pep_create_statement.txt http://ucsu.colorado.edu/~bethard/py/pep_create_statement.html PEP: XXX Title: The create statement Version: $Revisi