Re: [Python-3000] os.popen versus subprocess.Popen

2008-04-22 Thread Andrew McNabb
If any user input is involved, there will almost certainly be security problems. If not, it will frequently break anyway. As Guido pointed out, you can specify shell=True to get this latter behavior. But if you do this, you often sacrifice correctness and/or security. It's not a good ha

Re: [Python-3000] os.popen versus subprocess.Popen

2008-04-22 Thread Andrew McNabb
On Tue, Apr 22, 2008 at 03:33:30PM -0300, Facundo Batista wrote: > 2008/4/22, Andrew McNabb <[EMAIL PROTECTED]>: > > > That's the best thing about subprocess. Whenever I've used APIs that > > accept a single string instead of list of arguments, I've q

Re: [Python-3000] os.popen versus subprocess.Popen

2008-04-22 Thread Andrew McNabb
s that accept a single string instead of list of arguments, I've quickly descended into quoting hell. -- Andrew McNabb http://www.mcnabbs.org/andrew/ PGP Fingerprint: 8A17 B57C 6879 1863 DE55 8012 AB4D 6098 8826 6868 pgpSAT3OjJ1is.pgp Description: PGP signature ___

Re: [Python-3000] [Python-ideas] Namespaces are one honking great idea -- let's do more of those!

2008-02-04 Thread Andrew McNabb
igration period. I kind of like the idea of doing the following: import sys major_version = sys.version_info[0] if major_version == 2: import script2 script2.main() elif major_version == 3: import script3 script3.main() It really shouldn't be too bad, I think. -- Andrew McNabb h

Re: [Python-3000] Set literal

2008-02-02 Thread Andrew McNabb
s just pointing out that with generator expressions, you can write: >>> lst = list(x**2 for x in xrange(10)) >>> which would make it less necessary to the equivalent syntax: >>> lst = [x**2 for x in xrange(10)] >>> -- Andrew McNabb http://www.

Re: [Python-3000] Python 3000 Status Update (Long!)

2007-06-22 Thread Andrew McNabb
lled the next time through. You lookup 'abs' each time just in case it's changed. -- Andrew McNabb http://www.mcnabbs.org/andrew/ PGP Fingerprint: 8A17 B57C 6879 1863 DE55 8012 AB4D 6098 8826 6868 signature.asc Description: Digital signature ___

Re: [Python-3000] Python 3000 Status Update (Long!)

2007-06-21 Thread Andrew McNabb
ethod. However, once you've already used the + operator to join two strings, you are much more likely to consider sum() for concatenating a list of strings. I remember being confused the first time I tried it and found that it didn't work. In the end, though, it's really not

Re: [Python-3000] Python 3000 Status Update (Long!)

2007-06-21 Thread Andrew McNabb
nd concatenating as strong as you do. When we write 'a' + 'b', I don't see any problem with saying that we're adding 'a' and 'b', and I don't think there's anything unclear about sum(['a', 'b', 'c']). -- And

Re: [Python-3000] Unicode IDs -- why NFC? Why allow ligatures?

2007-06-08 Thread Andrew McNabb
On Thu, Jun 07, 2007 at 06:50:57PM -0400, Jim Jewett wrote: > On 6/7/07, Andrew McNabb <[EMAIL PROTECTED]> wrote: > > On Wed, Jun 06, 2007 at 07:06:05PM -0400, Jim Jewett wrote: > > > (There were mixed opinions on Technical symbols, and no one has spoken > > > up

Re: [Python-3000] Assignment decorators

2006-12-08 Thread Andrew McNabb
function decorators get something like: def private(func): pass Would these be unified, or would something completely different happen? -- Andrew McNabb http://www.mcnabbs.org/andrew/ PGP Fingerprint: 8A17 B57C 6879 1863 DE55 8012 AB4D 6098 8826 6868 pgpKWGV2CS5BV.pgp Description: PGP signatu