Re: [Python-Dev] Python FAQ: Why doesn't Python have a "with" statement?

2008-06-14 Thread Simon Cross
On Sat, Jun 14, 2008 at 10:16 AM, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > I am a great fan of Pascal-style with blocks, and I'd love Python to get > something like them. But I have concluded that they simply aren't > practical in Python. Your suggestion sounds reasonable at first glance, > but

Re: [Python-Dev] Python FAQ: Why doesn't Python have a "with" statement?

2008-06-14 Thread Simon Cross
On Sat, Jun 14, 2008 at 9:53 PM, Cesare Di Mauro <[EMAIL PROTECTED]> wrote: > Just take a look at the example I reported: don't you find it easier to read? Sure, it's perhaps a bit easier on the eyes, but readability includes understanding what's the code does. Let's take an example: >on Tkinter

Re: [Python-Dev] Python FAQ: Why doesn't Python have a "with" statement?

2008-06-14 Thread Simon Cross
On Sat, Jun 14, 2008 at 10:19 PM, Cesare Di Mauro <[EMAIL PROTECTED]> wrote: > from Tkinter import * I discourage this too. :) Schiavo Simob ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe

Re: [Python-Dev] Undocumenting test.support in 3.x (was Py3k DeprecationWarning in stdlib)

2008-06-26 Thread Simon Cross
On Thu, Jun 26, 2008 at 12:27 AM, Brett Cannon <[EMAIL PROTECTED]> wrote: > Right, but I would think all core developers know about test.support > and are capable of reading the code and docstring. Docstrings don't help for things other than Modules, Classes and Functions. So, for example, are co

Re: [Python-Dev] String concatenation

2008-08-03 Thread Simon Cross
On Sun, Aug 3, 2008 at 8:29 PM, Antoine Pitrou <[EMAIL PROTECTED]> wrote: > In many cases there is no runtime concatenation cost. > def f(): > ... return "first" + "second" > ... import dis dis.dis(f) > 2 0 LOAD_CONST 3 ('firstsecond') > 3 RETUR

Re: [Python-Dev] Filename as byte string in python 2.6 or 3.0?

2008-09-27 Thread Simon Cross
On Sat, Sep 27, 2008 at 7:41 PM, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > As for 3.0, I'd like to argue that the problem is a minor issue. Even > though you may run into file names that can't be decoded, that happening > really indicates some bigger problem in the management of the system > w

Re: [Python-Dev] Patch for an initial support of bytes filename in Python3

2008-09-30 Thread Simon Cross
On Tue, Sep 30, 2008 at 7:56 PM, Guido van Rossum <[EMAIL PROTECTED]> wrote: > (since os.getcwdb() is a Unix-only thing). I would be happier if all the Unix byte functions existed on Windows fell back to something like encoding the filenames to/from UTF-8. Then at least it would be possible for pr

Re: [Python-Dev] Patch for an initial support of bytes filename in Python3

2008-10-01 Thread Simon Cross
On Wed, Oct 1, 2008 at 12:05 AM, Guido van Rossum <[EMAIL PROTECTED]> wrote: > Actually on Windows the syscalls use the encoding that Microsoft uses > -- when using bytes we use the Windows bytes API and when using str we > use the Windows wide API. That's the most platform-compatible > approach.

Re: [Python-Dev] Patch for an initial support of bytes filename in Python3

2008-10-01 Thread Simon Cross
On Wed, Oct 1, 2008 at 12:04 AM, Guido van Rossum <[EMAIL PROTECTED]> wrote: > Plus, even on Linux Unicode is *usually* what you should be doing, > unless you're writing a backup tool. I still find this line of reasoning a bit worrying. Imagine an end user application like a music player. The user

Re: [Python-Dev] Patch for an initial support of bytes filename in Python3

2008-10-01 Thread Simon Cross
On Wed, Oct 1, 2008 at 12:25 PM, Stephen J. Turnbull <[EMAIL PROTECTED]> wrote: > Simon Cross writes: > > > I still find this line of reasoning a bit worrying. Imagine an end > > user application like a music player. The user discovers that he can't > > see so

Re: [Python-Dev] Trap SIGSEGV and SIGFPE

2008-12-10 Thread Simon Cross
On Wed, Dec 10, 2008 at 8:37 PM, Victor Stinner <[EMAIL PROTECTED]> wrote: > Recover after a segfault is dangerous, but my first goal was to get the Python > backtrace instead just one line: "Segmentation fault". It helps a lot for > debug! This would be extremely useful. I've had PyGTK segfault o

Re: [Python-Dev] another Python Bug Day?

2009-01-05 Thread Simon Cross
If there's going to be another bug day, I'd like to see the problem of getting patches from the bug tracker into Python addressed in some way. It's kinda frustrating to work on things and not actually get to close any issues because there are not enough people with commit access taking part. It'd

Re: [Python-Dev] another Python Bug Day?

2009-01-06 Thread Simon Cross
On Tue, Jan 6, 2009 at 9:47 PM, Brett Cannon wrote: > This is a years-old problem that is not going to be fixed overnight > (unfortunately). But it is known and is being worked on (moving to a > DVCS, writing up docs on the development process to cut down on bad > patches, etc.). It's encouraging

Re: [Python-Dev] compiling python2.5 on linux under wine

2009-01-08 Thread Simon Cross
On Sat, Jan 3, 2009 at 11:22 PM, Luke Kenneth Casson Leighton wrote: > secondly, i want a python25.lib which i can use to cross-compile > modules for poor windows users _despite_ sticking to my principles and > keeping my integrity as a free software developer. If this eventually leads to being a

Re: [Python-Dev] Ctypes and the stdlib (was Re: LZMA compression support in 3.3)

2011-08-28 Thread Simon Cross
On Sun, Aug 28, 2011 at 6:58 AM, Terry Reedy wrote: > 2) It is not trivial to use it correctly. I think it needs a SWIG-like > companion script that can write at least first-pass ctypes code from the .h > header files. Or maybe it could/should use header info at runtime (with the > .h bundled with

Re: [Python-Dev] Maintenance burden of str.swapcase

2011-09-07 Thread Simon Cross
On Tue, Sep 6, 2011 at 10:36 PM, "Martin v. Löwis" wrote: >> Which applications? I'm not sure the number of applications using >> str.swapcase gets even as high as ten. > > I think this is what people underestimate. I can't name > applications either - but that doesn't mean they don't exist. > I'm

Re: [Python-Dev] Maintenance burden of str.swapcase

2011-09-07 Thread Simon Cross
On Wed, Sep 7, 2011 at 6:31 PM, Simon Cross wrote: > http://www.google.com/codesearch#search/&q=swapcase%20lang:%5Epython$&type=cs > > There are quite a few hits but more people appear to be > re-implementing it than using it (I haven't gone to the trouble of > mining

Re: [Python-Dev] RFC: Add a new builtin strarray type to Python?

2011-10-02 Thread Simon Cross
On Sat, Oct 1, 2011 at 7:17 PM, Victor Stinner wrote: > I'm writing this email to ask you if this type solves a real issue, or if we > can just prove the super-fast str.join(list of str). I'm -1 on hacking += to be fast again because having the two loops below perform wildly differently is *very*

Re: [Python-Dev] RFC: Add a new builtin strarray type to Python?

2011-10-02 Thread Simon Cross
On Sun, Oct 2, 2011 at 7:23 PM, Simon Cross wrote: > I'm -1 on hacking += to be fast again because having the two loops > below perform wildly differently is *very* surprising to me: > > s = '' > for x in loops: >    s += x > > s = '' > for

Re: [Python-Dev] Python 3.4 Release Manager

2011-11-23 Thread Simon Cross
On Wed, Nov 23, 2011 at 6:50 AM, Senthil Kumaran wrote: > That's cool.  But just my thought, wouldn't it be better for someone > who regularly commits, fixes bugs and feature requests be better for a > RM role? Once a developer gets bored with those and wants more, could > take up RM role. Is ther

Re: [Python-Dev] PEP 408 -- Standard library __preview__ package

2012-01-28 Thread Simon Cross
On Sat, Jan 28, 2012 at 9:49 AM, Matt Joiner wrote: > FWIW I'm now -1 for this idea. Stronger integration with PyPI and > packaging systems is much preferable. Python core public releases are > no place for testing. +1. I'd much rather just use the module from PyPI. It would be good to have a pr

Re: [Python-Dev] Add a new "locale" codec?

2012-02-07 Thread Simon Cross
Is the idea to have: b"foo".decode("locale") be roughly equivalent to encoding = locale.getpreferredencoding(False) b"foo".decode(encoding) ? ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Un

Re: [Python-Dev] Add a new "locale" codec?

2012-02-08 Thread Simon Cross
I think I'm -1 on a "locale" encoding because it refers to different actual encodings depending on where and when it's run, which seems surprising, and there's already a more explicit way to achieve the same effect. The documentation on .getpreferredencoding() says some scary things about needing

Re: [Python-Dev] Add a new "locale" codec?

2012-02-08 Thread Simon Cross
On Wed, Feb 8, 2012 at 3:25 PM, Victor Stinner wrote: > Sorry, I don't understand what do you mean by "weird things". The > "locale" codec doesn't touch the locale. Sorry for being unclear. My question was about the following lines from http://docs.python.org/library/locale.html#locale.getpreferr

Re: [Python-Dev] Add a new "locale" codec?

2012-02-08 Thread Simon Cross
On Wed, Feb 8, 2012 at 3:25 PM, Victor Stinner wrote: > The current locale is process-wide: if a thread changes the locale, > all threads are affected. Some functions have to use the current > locale encoding, and not the locale encoding read at startup. Examples > with C functions: strerror(), st

Re: [Python-Dev] Add a new "locale" codec?

2012-02-08 Thread Simon Cross
On Thu, Feb 9, 2012 at 2:35 AM, Steven D'Aprano wrote: > Simon Cross wrote: >> >> I think I'm -1 on a "locale" encoding because it refers to different >> actual encodings depending on where and when it's run, which seems >> surprising > >

Re: [Python-Dev] Proposing an alternative to PEP 410

2012-02-26 Thread Simon Cross
On Sun, Feb 26, 2012 at 1:31 AM, Guido van Rossum wrote: > I still think that when you are actually interested in *using* times, > the current float format is absolutely fine. Anybody who thinks they > need to accurately know the absolute time that something happened with > nanosecond accuracy is

Re: [Python-Dev] Proposing an alternative to PEP 410

2012-02-26 Thread Simon Cross
On Sun, Feb 26, 2012 at 6:12 PM, Larry Hastings wrote: > It's probably neutral.  But I do have one question: can you foresee the > scientific community moving to a finer resolution than nanoseconds in our > lifetimes? I think we're already there. Even just in radio astronomy new arrays like ALMA

Re: [Python-Dev] PEP 414

2012-02-27 Thread Simon Cross
On Mon, Feb 27, 2012 at 5:44 PM, Armin Ronacher wrote: > Agile development and unittests.  An installation hook means that you > need to install the package before running the tests.  Which is fine for > CI but horrible during development.  "python3 run-tests.py" beats "make > venv; install librar

Re: [Python-Dev] odd "tuple does not support assignment" confusion...

2012-03-02 Thread Simon Cross
l[0] += [1] is the same as l[0] = l[0] + [1] Does that make the reason for the error clearer? The problem is the attempt to assign a value to l[0]. It is not the same as e = l[0] e += [1] which is the equivalent to e = l[0] e = e + [1] This never assigns a value to l[0]. Schiavo Simon

Re: [Python-Dev] odd "tuple does not support assignment" confusion...

2012-03-02 Thread Simon Cross
On Sat, Mar 3, 2012 at 1:38 AM, R. David Murray wrote: > What is even more fun is that the append actually worked (try printing > l). Now that is just weird. :) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/py

Re: [Python-Dev] 2.7.4

2013-01-19 Thread Simon Cross
On Sat, Jan 19, 2013 at 9:30 PM, Benjamin Peterson wrote: > It's been almost a year since 2.7.3, so it's time for another 2.7 > bugfix release. > > 2013-02-02 - 2.7.4 release branch created; rc released > 2013-02-16 - 2.7.4 released The Cape Town Python User Group is having a Python Bug Day next

Re: [Python-Dev] BDFL delegation for PEP 426 (PyPI metadata 1.3)

2013-02-03 Thread Simon Cross
On Sun, Feb 3, 2013 at 9:42 PM, Daniel Holth wrote: > Bento is the only available packaging tool to heap praise onto and it is > impressive. If Bento is cool, is there some way we can help it gain more traction in the Python ecosystem? Not necessarily by incorporating it into stdlib, but perhaps

Re: [Python-Dev] BDFL delegation for PEP 426 (PyPI metadata 1.3)

2013-02-03 Thread Simon Cross
On Mon, Feb 4, 2013 at 12:16 AM, Vinay Sajip wrote: > Bento is interesting, but I wouldn't jump to heap praise onto it. Apart from > the > somewhat idiosyncratic source style, David Cournapeau himself points to what > he > regards as weaknesses in it[1]. For the record, all the reasons listed a

Re: [Python-Dev] Submitting PEP 422 (Simple class initialization hook) for pronouncement

2013-02-10 Thread Simon Cross
On Sun, Feb 10, 2013 at 2:32 PM, Nick Coghlan wrote: > For those that don't recall the original discussion, the proposal is > to add a new __init_class__ hook, invoked after the class object is > created, but before the class decorators are applied. This provides a > simple approach to inherited p

<    1   2