Re: [Python-Dev] Test cases not garbage collected after run

2011-04-14 Thread Michael Foord
On 14/04/2011 00:23, Martin (gzlist) wrote: On 07/04/2011, Michael Foord wrote: On 07/04/2011 20:18, Robert Collins wrote: Testtools did something to address this problem, but I forget what it was offhand. Some issues were worked around, but I don't remember any comprehensive solution.

Re: [Python-Dev] python and super

2011-04-14 Thread Michael Foord
called for you. If an individual method doesn't call super then a theoretical implementation could skip the parents methods (unless another child calls super). All the best, Michael Foord Ronald ___ Python-Dev mailing list Python-Dev@pytho

Re: [Python-Dev] python and super

2011-04-14 Thread Michael Foord
On 14/04/2011 16:02, Laura Creighton wrote: I think that if you add this, people will start relying on it. And the specific problem with that would be? Michael Laura -- http://www.voidspace.org.uk/ May you do good and not evil May you find forgiveness for yourself and forgive others May

Re: [Python-Dev] python and super

2011-04-14 Thread Michael Foord
On 14/04/2011 16:34, P.J. Eby wrote: At 03:55 PM 4/14/2011 +0100, Michael Foord wrote: Ricardo isn't suggesting that Python should always call super for you, but when you *start* the chain by calling super then Python could ensure that all the methods are called for you. If an indiv

Re: [Python-Dev] python and super

2011-04-14 Thread Michael Foord
On 14/04/2011 17:02, Raymond Hettinger wrote: On Apr 14, 2011, at 8:34 AM, P.J. Eby wrote: At 03:55 PM 4/14/2011 +0100, Michael Foord wrote: Ricardo isn't suggesting that Python should always call super for you, but when you *start* the chain by calling super then Python could ensure

Re: [Python-Dev] python and super

2011-04-15 Thread Michael Foord
On 15/04/2011 02:02, Greg Ewing wrote: Michael Foord wrote: What I was suggesting is that a method not calling super shouldn't stop a *sibling* method being called, but could still prevent the *parent* method being called. There isn't necessarily a clear distinction between p

Re: [Python-Dev] python and super

2011-04-15 Thread Michael Foord
D(1) This is printed: C B (A __init__ is not called). For this: class D(A, C): def __init__(self, a): super().__init__(a) D(1) The following is printed: A (B and C __init__ methods are not called.) All the best, Michael Foord "I, as a consumer of django, shouldn'

Re: [Python-Dev] python and super

2011-04-15 Thread Michael Foord
On 15/04/2011 16:18, Carl Meyer wrote: On 04/15/2011 08:53 AM, Michael Foord wrote: If we treat django's failure to use super as a bug, you want the Python language to work-around that bug so that: What you say (that this particular circumstance could be treated as a bug in django) is

[Python-Dev] Python Language Summit at EuroPython: 19th June

2011-04-16 Thread Michael Foord
event, would be much appreciated. All the best, Michael Foord N.B. Due to my impending doom (oops, I mean impending fatherhood) I am not yet 100% certain I will be able to attend. If I can't I will arrange for someone else to chair. -- http://www.voidspace.org.uk/ May you do good an

Re: [Python-Dev] Status of json (simplejson) in cpython

2011-04-16 Thread Michael Foord
an be demonstrated. Well, there was a 5x speedup demonstrated comparing simplejson to the standard library json module. That sound like *very* worth pursuing (and crazy not to pursue). I've had json serialisation be the bottleneck in web applications generating several megabytes of json for

Re: [Python-Dev] python and super

2011-04-17 Thread Michael Foord
On 17 April 2011 02:48, Steven D'Aprano wrote: > Michael Foord wrote: > >> On 15/04/2011 02:23, Steven D'Aprano wrote: >> > [...] > > If we treat django's failure to use super as a bug, you want the Python >>> language to work-around

Re: [Python-Dev] Status of json (simplejson) in cpython

2011-04-17 Thread Michael Foord
On 17/04/2011 00:16, Antoine Pitrou wrote: On Sat, 16 Apr 2011 23:48:45 +0100 Michael Foord wrote: On 16/04/2011 22:28, "Martin v. Löwis" wrote: Am 16.04.2011 21:13, schrieb Vinay Sajip: Martin v. Löwis v.loewis.de> writes: Does it actually need improvement? I can't

Re: [Python-Dev] Status of json (simplejson) in cpython

2011-04-17 Thread Michael Foord
On 17/04/2011 07:28, "Martin v. Löwis" wrote: Well, there was a 5x speedup demonstrated comparing simplejson to the standard library json module. Can you kindly point to that demonstration? Hmm... according to a later email in this thread it is 350ms vs 250ms for an 11kb sample. That's a nice

Re: [Python-Dev] Status of json (simplejson) in cpython

2011-04-17 Thread Michael Foord
On 17/04/2011 17:05, Michael Foord wrote: On 17/04/2011 00:16, Antoine Pitrou wrote: On Sat, 16 Apr 2011 23:48:45 +0100 Michael Foord wrote: On 16/04/2011 22:28, "Martin v. Löwis" wrote: Am 16.04.2011 21:13, schrieb Vinay Sajip: Martin v. Löwis v.loewis.de> writes: Doe

Re: [Python-Dev] Test cases not garbage collected after run

2011-04-21 Thread Michael Foord
On 15/04/2011 17:49, Martin (gzlist) wrote: On 14/04/2011, Michael Foord wrote: I'd be interested to know what is keeping the tests alive even when the test suite isn't. As far as I know there is nothing else in unittest that would do that. The main cause is some handy code for coll

Re: [Python-Dev] the role of assert in the standard library ?

2011-04-28 Thread Michael Foord
. All the best, Michael Foord So, I grepped the stdlib for assert calls, and I have found 177 of them and many of them are making Python acts differently depending on the -O flag, Here's an example on a randomly picked assert in the threading module: This, to me is wrong: def __i

Re: [Python-Dev] Proposal for a common benchmark suite

2011-04-29 Thread Michael Foord
n. The Unladen Swallow folks didn't like pybench as a benchmark. This is all true, but I think there's a general misunderstanding of what pybench is. pybench proved useful for IronPython. It certainly highlighted some performance problems with some of the basic operations it measures. Al

[Python-Dev] Fwd: viewVC shows traceback on non utf-8 module markup

2011-04-29 Thread Michael Foord
I know that the svn repo is now for legacy purposes only, but I doubt it is intended that the online source browser should raise exceptions. (See report below.) All the best, Michael Original Message Subject:viewVC shows traceback on non utf-8 module markup Date: T

Re: [Python-Dev] Linus on garbage collection

2011-05-06 Thread Michael Foord
ects unfinalised and memory unreclaimed. Not sure what Java does. All the best, Michael Foord Skip ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/

Re: [Python-Dev] Linus on garbage collection

2011-05-06 Thread Michael Foord
On 06/05/2011 17:32, Gregory P. Smith wrote: On Fri, May 6, 2011 at 9:18 AM, wrote: Antoine> Since we're sharing links, here's Matt Mackall's take: Antoine> http://www.selenic.com/pipermail/mercurial-devel/2011-May/031055.html > From that note: 1: You can't have meaningful dest

Re: [Python-Dev] Linus on garbage collection

2011-05-06 Thread Michael Foord
On 06/05/2011 17:51, Stefan Behnel wrote: Mark Shannon, 06.05.2011 18:33: s...@pobox.com wrote: Antoine> Since we're sharing links, here's Matt Mackall's take: Antoine> http://www.selenic.com/pipermail/mercurial-devel/2011-May/031055.html From that note: 1: You can't have meaningful destruc

Re: [Python-Dev] Linus on garbage collection

2011-05-06 Thread Michael Foord
On 06/05/2011 18:07, Glyph Lefkowitz wrote: On May 6, 2011, at 12:31 PM, Michael Foord wrote: pypy and .NET choose to arbitrarily break cycles rather than leave objects unfinalised and memory unreclaimed. Not sure what Java does. I think that's a mischaracterization of their respe

Re: [Python-Dev] Python 3.x and bytes

2011-05-19 Thread Michael Foord
On 19/05/2011 10:25, Łukasz Langa wrote: Wiadomość napisana przez Stefan Behnel w dniu 2011-05-19, o godz. 10:37: But why wouldn't "they" expect `b'de' + 1` to work as well in this case? If a 1-byte bytes is equivalent to an integer, why not an arbitrary one as well? The result of this must o

Re: [Python-Dev] Python 3.3 release schedule posted

2011-05-25 Thread Michael Foord
or who's working on it :) Hey lvh, It's worth following this up. If Jim Fulton hasn't had time to move this forward and you have the bandwidth to work on it then it would be great to see some action. All the best, Michael Foord -- cheers lvh _

[Python-Dev] Release pages malformed on python.org

2011-05-31 Thread Michael Foord
the news on the front page. All the best, Michael Foord -- http://www.voidspace.org.uk/ May you do good and not evil May you find forgiveness for yourself and forgive others May you share freely, never taking more than you give. -- the sqlite blessing http://www.sqlite.org/different.html

Re: [Python-Dev] Some additions to .hgignore

2011-06-01 Thread Michael Foord
On 31/05/2011 23:59, Sandro Tosi wrote: Hi all, following http://docs.python.org/devguide/coverage.html doc you'll end up with several "new" files/dirs in your checkout: - .coverage, used by coveragepy to save its info - coverage/ , the symlink to coveragepy/coverage - htmlcov/ , the dir where t

[Python-Dev] Windows download links not working for 2.7.2rc1 and 3.1.4rc1

2011-06-02 Thread Michael Foord
Hey all, The links to the Windows downloads for 2.7.2rc1 and 3.1.4rc1 are 404. (From the release pages.) http://python.org/ftp/python/3.1.3/python-3.1.4rc1.msi http://python.org/ftp/python/2.7.1/python-2.7.2rc1.msi All the best, Michael Foord -- http://www.voidspace.org.uk/ May

Re: [Python-Dev] In-Python virtualisation and packaging

2011-06-13 Thread Michael Foord
y, but it does raise maintenance and development issues. Don't forget windows support! ;-) All the best, Michael Foord If people want to experiment with this code without cloning and building, I created a Debian package using checkinstall, which can be installed using sudo dpkg -i py

Re: [Python-Dev] In-Python virtualisation and packaging

2011-06-13 Thread Michael Foord
On 14/06/2011 00:46, Carl Meyer wrote: [snip...] So I don't think a virtualenv stdlib module would be at all likely to break on a new OS release, if Python itself is not broken by that OS release. (It certainly wouldn't be the stdlib module most likely to be broken by OS changes, in comparison to

Re: [Python-Dev] Issue10403 - using 'attributes' instead of members in documentation

2011-06-27 Thread Michael Foord
On 27/06/2011 09:24, Antoine Pitrou wrote: Le Mon, 27 Jun 2011 11:32:32 +1000, Nick Coghlan a écrit : On Mon, Jun 27, 2011 at 7:52 AM, Terry Reedy wrote: or the 'attribute' substitution everywhere makes sense? No. My strong history-based opinions ;-). +1 to what Terry said. "Members" is

Re: [Python-Dev] Issue10403 - using 'attributes' instead of members in documentation

2011-06-27 Thread Michael Foord
descriptors, but that terminology requires a reasonably advanced understanding of the Python data model. I don't think that "all members, made up of attributes plus methods" is hard to understand. That's a great benefit. The fact that you can technically treat methods as att

Re: [Python-Dev] Snow Leopard buildbot failing again...

2011-06-27 Thread Michael Foord
On 27/06/2011 18:01, Bill Janssen wrote: I see that parc-snowleopard-1 went down again. I've done a software update, rebooted, and installed the latest buildslave, 0.8.4. I can ping dinsdale.python.org successfully from the machine. However, when I start the buildslave, I get this: $ buildsla

Re: [Python-Dev] Issue10403 - using 'attributes' instead of members in documentation

2011-06-27 Thread Michael Foord
On 27/06/2011 20:22, R. David Murray wrote: [snip...] So, the correct generic term for something that can be accessed via attribute notation is attribute. The more specific term for an attribute that is a method is method. We don't currently have a more specific collective term for attributes t

Re: [Python-Dev] Issue10403 - using 'attributes' instead of members in documentation

2011-06-27 Thread Michael Foord
On 27/06/2011 23:18, Terry Reedy wrote: On 6/27/2011 2:33 PM, Terry Reedy wrote: Let me repeat that that is historically wrong for Python, and illustrate why the term 'members' should not be used. From the 1.5 Language Reference, 3.2 Standard type hierarchy: "There are also some 'generic' speci

Re: [Python-Dev] Issue10403 - using 'attributes' instead of members in documentation

2011-06-28 Thread Michael Foord
riptors"). The problem with "data attributes" is that it doesn't mean *anything*, which I suppose is useful for invented terminology, but it means it doesn't convey anything precise to those who haven't heard the term before. If it becomes widely used then that chang

Re: [Python-Dev] Issue10403 - using 'attributes' instead of members in documentation

2011-06-28 Thread Michael Foord
On 28/06/2011 12:04, Fred Drake wrote: On Tue, Jun 28, 2011 at 6:54 AM, Michael Foord wrote: Added to which there are other descriptors, notably property, that are not directly callable but are not provided as normal "data attributes" (although the access syntax is the same). Prop

Re: [Python-Dev] Issue10403 - using 'attributes' instead of members in documentation

2011-06-28 Thread Michael Foord
On 28/06/2011 12:51, R. David Murray wrote: On Tue, 28 Jun 2011 11:54:39 +0100, Michael Foord wrote: On 28/06/2011 11:44, Fred Drake wrote: But "callable attributes" aren't the same thing as methods; most are methods, but not all. Sometimes, they're data used by the ob

Re: [Python-Dev] Issue10403 - using 'attributes' instead of members in documentation

2011-06-28 Thread Michael Foord
On 28/06/2011 13:31, Nick Coghlan wrote: On Tue, Jun 28, 2011 at 8:54 PM, Michael Foord wrote: The problem with "data attributes" is that it doesn't mean *anything*, which I suppose is useful for invented terminology, but it means it doesn't convey anything precise to tho

Re: [Python-Dev] Issue10403 - using 'attributes' instead of members in documentation

2011-06-28 Thread Michael Foord
On 28/06/2011 13:56, Michael Foord wrote: On 28/06/2011 13:31, Nick Coghlan wrote: On Tue, Jun 28, 2011 at 8:54 PM, Michael Foord wrote: The problem with "data attributes" is that it doesn't mean *anything*, which I suppose is useful for invented terminology, but it means it

Re: [Python-Dev] Issue10403 - using 'attributes' instead of members in documentation

2011-06-28 Thread Michael Foord
On 28/06/2011 14:20, Steven D'Aprano wrote: Michael Foord wrote: What do you mean by "instances can have methods as instance attributes"? Once you attach a bound method directly to an instance it becomes a slightly different beast I think. (On top of which that is pretty

Re: [Python-Dev] EuroPython Language Summit report

2011-06-28 Thread Michael Foord
On 24/06/2011 15:55, R. David Murray wrote: On Fri, 24 Jun 2011 10:52:40 +0200, Mark Dickinson wrote: EuroPython 2011 Language Summit === [...] Unicode character classes is a particular need). [Subtopic: what needs to be done to get the new regex module

Re: [Python-Dev] open(): set the default encoding to 'utf-8' in Python 3.3?

2011-06-28 Thread Michael Foord
On 28/06/2011 15:36, Terry Reedy wrote: On 6/28/2011 10:02 AM, M.-A. Lemburg wrote: How about a more radical change: have open() in Py3 default to opening the file in binary mode, if no encoding is given (even if the mode doesn't include 'b') ? That'll make it compatible to the Py2 world again

Re: [Python-Dev] Issue10403 - using 'attributes' instead of members in documentation

2011-06-28 Thread Michael Foord
On 28/06/2011 16:23, Terry Reedy wrote: On 6/28/2011 7:51 AM, R. David Murray wrote: Also, instances can have methods as instance attributes. Functions that are instance attributes do not act like methods (instance.func() does not automagically turn instance in the first arg of func) and ha

Re: [Python-Dev] svn.python.org confusion

2011-06-28 Thread Michael Foord
do an svn co. Perhaps that should just be disabled totally for python? For what it's worth we've had a couple of emails about this to webmas...@python.org (in particular because the viewc svn browser breaks on some latin-1 in source files). All the best, Michael Foord -- http://www.v

Re: [Python-Dev] open(): set the default encoding to 'utf-8' in Python 3.3?

2011-06-28 Thread Michael Foord
On 28/06/2011 17:34, Terry Reedy wrote: On 6/28/2011 10:48 AM, Michael Foord wrote: On 28/06/2011 15:36, Terry Reedy wrote: S = open('myfile.txt').read() now return a text string in both Py2 and Py3 and a subsequent 'abc' in S works in both. Nope, it returns a by

Re: [Python-Dev] open(): set the default encoding to 'utf-8' in Python 3.3?

2011-06-28 Thread Michael Foord
On 28/06/2011 18:06, Terry Reedy wrote: On 6/28/2011 10:46 AM, Paul Moore wrote: I use Windows, and come from the UK, so 99% of my text files are ASCII. So the majority of my code will be unaffected. But in the occasional situation where I use a £ sign, I'll get encoding errors, I do not unde

Re: [Python-Dev] EuroPython Language Summit report

2011-06-28 Thread Michael Foord
On 28/06/2011 18:08, Bill Janssen wrote: Michael Foord wrote: The new regex library has some great improvements: http://bugs.python.org/issue2636 It also has users and committed maintainers, so I hope we can bring it into 3.3. It wasn't easy to tell from skimming the change notes

Re: [Python-Dev] PEP 397 (Python launcher for Windows) reference implementation

2011-06-30 Thread Michael Foord
On 30/06/2011 08:34, Tim Golden wrote: On 30/06/2011 05:23, Mark Hammond wrote: On 30/06/2011 3:00 AM, Vinay Sajip wrote: PEP 397 (Python launcher for Windows) has a reference implementation in Python. Does anyone know of a C implementation, or is planning/working on one? I realise this is the

[Python-Dev] Fwd: Dead link to documentation on Python main page

2011-07-11 Thread Michael Foord
Original Message Subject:Dead link to documentation on Python main page Date: Mon, 11 Jul 2011 09:27:57 -0500 From: René van Oostrum To: webmas...@python.org Hi, http://www.python.org -> Quick Links (3.2.1), Documentation points to http://http://docs.pyth

Re: [Python-Dev] 3.2.1 encoding surprise

2011-07-21 Thread Michael Foord
On 21/07/2011 15:43, Paul Moore wrote: On 21 July 2011 09:13, Glenn Linderman wrote: Certainly when the launcher is invoked via an association, this would be the case. However, when the launcher is invoked via the command line, then the unqualified name is passed through. To be useful from th

Re: [Python-Dev] Python launcher command line usage (Was: 3.2.1 encoding surprise)

2011-07-22 Thread Michael Foord
On 22/07/2011 02:30, Vlad Riscutia wrote: If versioned filenames are added in addition to python.exe, it still might look confusing for most users: Why do I have python and python3.2 executables? What's the difference? I'd rather go with -v argument either way, for people that /know/ they want

Re: [Python-Dev] [Python-checkins] cpython: Issue #11049: adding some tests to test.support

2011-07-27 Thread Michael Foord
On 27/07/2011 03:04, Brett Cannon wrote: On Tue, Jul 26, 2011 at 17:41, Nick Coghlan > wrote: On Wed, Jul 27, 2011 at 12:10 AM, Éric Araujo mailto:mer...@netwok.org>> wrote: > Le 26/07/2011 15:30, Antoine Pitrou a écrit : >> Actually, you want %a for non

Re: [Python-Dev] The docs, reloaded [PEP?]

2007-05-24 Thread Michael Foord
This subject is generating a lot of discussion and [almost entirely] positive feedback. It would be a great shame to run out of steam. Does it need a PEP to see a chance of it getting accepted as the formal documentation system? (or a pronouncement that it will never happen...) Michael Foord

Re: [Python-Dev] New Super PEP

2007-05-30 Thread Michael Foord
d won't work if it's been aliased. > Being able to access the calling frame from IronPython would be really useful... Michael Foord http://www.voidspace.org.uk/ironpython/index.shtml > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf

[Python-Dev] Inspect Patch for IronPython (and Jython?) Compatibility

2007-06-19 Thread Michael Foord
ee http://jython.svn.sourceforge.net/viewvc/jython?view=rev&revision=3200 As it is a bugfix - backporting to 2.5 would be great. Should I generate a separate patch? All the best, Michael Foord ___ Python-Dev mailing list Python-Dev@python.org http:

Re: [Python-Dev] Inspect Patch for IronPython (and Jython?) Compatibility

2007-06-19 Thread Michael Foord
No behaviour change. Thanks Michael Foord > > I won't have the time to submit this, but I'm sure there are others > here who do. > > --Guido > > On 6/19/07, Michael Foord <[EMAIL PROTECTED]> wrote: >> Hello all, >> >> I've just submitted a

Re: [Python-Dev] Need help fixing failing Py3k Unittests in py3k-struni

2007-07-11 Thread Michael Foord
the ftruncate function does not exist on Windows. >> > > I don't have a Windows box; contributions to fix this situation are welcome. > You would accept a donated Windows box ? (1/2 ;-) Michael Foord ___ Python-Dev mailin

Re: [Python-Dev] [python] Re: import file extensions

2007-09-14 Thread Michael Foord
Guido van Rossum wrote: > I think you're looking for a PEP 302 style meta hook. > Or even execfile in a context... Michael Foord http://www.manning.com/foord > On 9/14/07, tomer filiba <[EMAIL PROTECTED]> wrote: > >> a quick question: i'm working on

Re: [Python-Dev] [python] New lines, carriage returns, and Windows

2007-09-26 Thread Michael Foord
Dino Viehland wrote: > We ran into an interesting user-reported issue w/ IronPython and the way > Python writes to files and I thought I'd get python-dev's opinion. > > When writing a string in text mode that contains \r\n we both write \r\r\n > because the default write mode is to replace \n wit

Re: [Python-Dev] [python] Re: New lines, carriage returns, and Windows

2007-09-26 Thread Michael Foord
Dino Viehland wrote: > My understanding is that users can write code that uses only \n and Python > will write the end-of-line character(s) that are appropriate for the platform > when writing to a file. That's what I meant by uses \n for everything > internally. > > But if you write \r\n to a

Re: [Python-Dev] [python] Re: New lines, carriage returns, and Windows

2007-09-26 Thread Michael Foord
e *such* a bad idea - but you will still get caught out by this. A string read in text mode will read '\r\n' as '\n'. Setting this on a winforms component will still do the wrong thing. Better to be aware of the difference and use binary mode. Michael > -Original Me

Re: [Python-Dev] [python] Re: New lines, carriage returns, and Windows

2007-09-29 Thread Michael Foord
nd practicality the former (IMO)... However, that would mean that round tripping a string would change it ('\r\n' would be written as '\r\n' and then read as '\n') - on the other hand (particularly given that we are treating the data as text and not a binary b

Re: [Python-Dev] [python] Re: New lines, carriage returns, and Windows

2007-09-29 Thread Michael Foord
Terry Reedy wrote: > "Michael Foord" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > | Guido van Rossum wrote: > > [snip first part of nice summary of Python i/o model] > > | > The other translation deals with line endings. Upon input, any o

Re: [Python-Dev] [python] Re: New lines, carriage returns, and Windows

2007-09-29 Thread Michael Foord
Steven Bethard wrote: > On 9/29/07, Michael Foord <[EMAIL PROTECTED]> wrote: > >> Terry Reedy wrote: >> >>> There are two normal ways for internal Python text to have \r\n: >>> 1. Read from a file with \r\r\n. Then \r\r\n is correct output (on

Re: [Python-Dev] [python] Re: New lines, carriage returns, and Windows

2007-09-29 Thread Michael Foord
Steven Bethard wrote: > On 9/29/07, Michael Foord <[EMAIL PROTECTED]> wrote: > >> Steven Bethard wrote: >> >>> On 9/29/07, Michael Foord <[EMAIL PROTECTED]> wrote: >>> >>> >>>> Terry Reedy wrote: >>>>

Re: [Python-Dev] [python] Re: New lines, carriage returns, and Windows

2007-09-30 Thread Michael Foord
[EMAIL PROTECTED] wrote: > Michael> Actually, I usually get these strings from Windows UI > Michael> components. A file containing '\r\n' is read in with '\r\n' > Michael> being translated to '\n'. New user input is added containing > Michael> '\r\n' line endings. The file is writte

Re: [Python-Dev] [python] Re: New lines, carriage returns, and Windows

2007-10-01 Thread Michael Foord
Steve Holden wrote: > Michael Foord wrote: > >> Steven Bethard wrote: >> >>> On 9/29/07, Michael Foord <[EMAIL PROTECTED]> wrote: >>> >>> >>>> Terry Reedy wrote: >>>> >>>> >

Re: [Python-Dev] [python] Should we do away with unbound methods in Py3k?

2007-11-21 Thread Michael Foord
calls (via the unbound method) > may go a little faster. Also, it would make it easier to fix this > issue: http://bugs.python.org/issue1109 > On occasions I've found it a drag that you *can't* call unbound methods with a different type.

Re: [Python-Dev] [poll] New name for __builtins__

2007-11-28 Thread Michael Foord
__root__ but I'm still > open for better suggestions. > +1 for '__root_namespace__' (explicit) +0.5 for '__root__' Michael Foord > Christian > ___ > Python-Dev mailing list > Python-Dev@python.org > ht

Re: [Python-Dev] [python] Re: removing the new and types modules

2007-11-28 Thread Michael Foord
[EMAIL PROTECTED] wrote: > Sorry if this is a dumb question, but are there actually good reasons to > remove "types"? > IMHO the types module helps keeping code readable. > For example > "if type(obj) == FloatType" > is just more readable than > "if type(obj) == type(1.0)". > if isinstance(ob

[Python-Dev] New Standard Library Module

2007-12-05 Thread Michael Foord
Hello all, Can I suggest a new module for the standard library: 'antigravity.py'. Perhaps it could display a particular image on import... Michael http://www.manning.com/foord ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/ma

Re: [Python-Dev] [python] Re: pkgutil, pkg_resource and Python 3.0 name space packages

2008-01-07 Thread Michael Foord
be updated to offer > the option of installing to this directory? What about python setup.py > install (add a --user flag, for example)? > The installers should give the user the choice at install time (preferably). A '--user' flag would also be useful (IMHO). Michael Foord &g

Re: [Python-Dev] pkgutil, pkg_resource and Python 3.0 name space packages

2008-01-09 Thread Michael Foord
Nick Coghlan wrote: > Jeroen Ruigrok van der Werven wrote: > >> -On [20080108 17:07], Christian Heimes ([EMAIL PROTECTED]) wrote: >> >>> Python's _winreg module and pywin32 expose several functions to get the >>> paths from the registry but I don't think it has a simple function like >>> ge

Re: [Python-Dev] pkgutil, pkg_resource and Python 3.0 name space packages

2008-01-09 Thread Michael Foord
Paul Moore wrote: > On 09/01/2008, Michael Foord <[EMAIL PROTECTED]> wrote: > >> Note today's Coding Horror blog entry: "Don't Pollute User Space" >> >> http://www.codinghorror.com/blog/archives/001032.html >> >&g

Re: [Python-Dev] [python] Re: PEP: per user site-packages directory

2008-01-12 Thread Michael Foord
m for Windows than other platforms? This would be a really useful feature for me and it would be a shame for it not to be on by default on Windows (and another set of complexities for setuptools I suspect). Michael Foord > > For security reasons we also need it disabled when the getuid() !

Re: [Python-Dev] [python] Re: PEP 370, open questions

2008-01-17 Thread Michael Foord
> > > I can't comment on the matter. I've not used roaming user profiles on > Windows for more than five years. Can someone with more experience shed > some like on the matter? > Roaming profiles still load and save the p

Re: [Python-Dev] [python] Re: PEP: per user site-packages directory

2008-01-21 Thread Michael Foord
o take seriously >> if we are interested in increasing take-up. >> > > setuptools and easy_install won't be included in Python 2.6 and 3.0: > http://www.python.org/dev/peps/pep-0365/ > Which is a shame. I agree with Steve on this - although I realise that Phillip is bas

Re: [Python-Dev] [python] Re: trunc()

2008-01-24 Thread Michael Foord
Jeffrey Yasskin wrote: > On Jan 24, 2008 1:11 PM, Raymond Hettinger <[EMAIL PROTECTED]> wrote: > >> [Raymond Hettinger] >> >>> Since something similar is happening to math.ceil and math.floor, >>> I'm curious why trunc() ended-up in builtins instead of the math >>> module. Doesn't it make

Re: [Python-Dev] [python] trunc()

2008-01-24 Thread Michael Foord
a thin wrapper around libm. > > So the question stands, why is trunc() different? Can anything > good come from having trunc() and int() in the same namespace? > If the ambiguity is that 'int' behaviour is unspecified for floats - is it naive to suggest we specify the be

Re: [Python-Dev] [python] TIOBE Programming Community Index

2008-01-26 Thread Michael Foord
y widely reported - and in fact is on the front page of Python.org! A site with a more interesting range of metrics (in my opinion) is 'langpop': http://www.langpop.com/ In its 'Normalized Comparison' it shows Python doing well, but not *quite* having

Re: [Python-Dev] [python] Re: [Python-checkins] r60283 - in python/trunk: Include/longintrepr.h Include/longobject.h Include/unicodeobject.h Misc/NEWS Modules/_fileio.c Objects/longobject.c Objects/un

2008-01-26 Thread Michael Foord
s not going to disturb the balance between > str/bytes/unicode. > I'm looking forward to having a native mutable bytes type in Python 2.x. Michael Foord ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/

Re: [Python-Dev] [python] Re: functions vs methods (was Re: trunc())

2008-01-28 Thread Michael Foord
useful in other languages. ;-) Michael Foord ___ 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/fuzzyman%40voidspace.org.uk -- http

[Python-Dev] Downloads Page

2008-02-24 Thread Michael Foord
Hello all, The downloads page on python.org shows 2.5.1 as the latest release: http://python.org/download/ Michael ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org

Re: [Python-Dev] [Python-3000] Python 2.6 and 3.0

2008-02-25 Thread Michael Foord
sy but special and uncommon > stuff really hard. > We build all our installers at Resolver Systems using Wix - dynamically generating parts of the templates and doing all sorts of weird and wonderful stuff (creating shortcuts, setting registry entries, testing dependencies, co

Re: [Python-Dev] unittest's redundant assertions: asserts vs. failIf/Unlesses

2008-03-19 Thread Michael Foord
object (and vice versa for assertFalse) For migration a simple subclass of TestCase that provides the old methods/semantics is trivial to write. No need for monkey-patching. Michael Foord > Its also interesting to note the original commit message: > > >> r34209 | purcell | 2003-0

Re: [Python-Dev] unittest's redundant assertions: asserts vs. failIf/Unlesses

2008-03-19 Thread Michael Foord
Jonathan Lange wrote: > On Wed, Mar 19, 2008 at 6:24 PM, Gabriel Grant <[EMAIL PROTECTED]> wrote: > >> Hi all, >> >> This gem from unittest.py is pretty much the opposite of "one obvious way": >> >> # Synonyms for assertion methods >> >> > [snip] > >> Could these be removed for 3k?

Re: [Python-Dev] [Python-3000] the release gods are angry at python

2008-03-27 Thread Michael Foord
Bill Janssen wrote: >> There >> have been other tests that have also been flaky like test_asynchat, >> test_smtplib, test_ssl, test_urllib2net, test_urllibnet, >> test_xmlrpc_net and some of the tests that use networking. >> > > Some of the *other* tests that use networking, I think you mean

Re: [Python-Dev] unittest's redundant assertions: asserts vs. failIf/Unlesses

2008-04-08 Thread Michael Foord
l tests should use > the operator their name implies, e.g. assertEqual(x, y) should do > something like > > if x == y: > pass > else: > raise AssertionError(...) > > rather than > > if x != y: > raise AssertionError(...) > &

Re: [Python-Dev] Reserving an arg space for Jython

2008-04-11 Thread Michael Foord
;> .NET, but maybe they would like one? >> > -X was suggested on Jython's irc. I kind of like -J, but -X would > work for us too. > IronPython has a host of -X:Something command line switches - so reserving -X would be helpful. Michael Foord > -Frank > __

Re: [Python-Dev] Global Python Sprint Weekends: May 10th-11th and June 21st-22nd.

2008-04-16 Thread Michael Foord
I should be able to help organise and attend the London contribution. Personally I'd like to work on the documentation changes / clean-up for the unittest module discussed recently. Michael Foord ___ Python-Dev mailing list Python-Dev@py

[Python-Dev] Proposed unittest changes

2008-04-17 Thread Michael Foord
lists and tuples that are the same length show the members (and indices?) that were different. I've copied Steve Purcell into this email, but his comments on issue 2578 indicate that he is happy for 'us' to make changes and he no longer has a string sense of "ownership" of t

Re: [Python-Dev] Proposed unittest changes

2008-04-17 Thread Michael Foord
sages for assertEquals and assertNotEquals when an explicit message is passed in * Improved message when comparing lists/tuples with assertEquals * The additional asserts that I suggested (In/NotIn, RaisesWithMessage, Is/NotIs) I think that there is still work I can do on the docs even before any

Re: [Python-Dev] Proposed unittest changes

2008-04-17 Thread Michael Foord
Christian Heimes wrote: > Michael Foord schrieb: > >> By etc I assume you mean: >> >> assertLessThan >> assertGreaterThan >> assertLessThanOrEquals >> assertGreaterThanOrEquals >> >> Would not variants be useful as well

Re: [Python-Dev] Proposed unittest changes

2008-04-17 Thread Michael Foord
Jesse Noller wrote: > On Thu, Apr 17, 2008 at 10:59 AM, Michael Foord > <[EMAIL PROTECTED]> wrote: > >> Guido van Rossum wrote: >> > I'm worried that a mass renaming would do anything but inconvenience >> > users during the already stressful 2->

Re: [Python-Dev] Proposed unittest changes

2008-04-17 Thread Michael Foord
Terry Reedy wrote: > "Michael Foord" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > | I think that there is still work I can do on the docs even before any > | grand renaming... > > In a related thread, I proposed and Guido approved that th

Re: [Python-Dev] unscriptable?

2008-04-18 Thread Michael Foord
Scott Dial wrote: > Benjamin Peterson wrote: > >> Consider this error: >> > 3["something"] > >> Traceback (most recent call last): >> File "", line 1, in >> TypeError: 'int' object is unsubscriptable >> >> "unscriptable" seems rather ambiguous. How about "[object] cann

Re: [Python-Dev] Encoding detection in the standard library?

2008-04-21 Thread Michael Foord
rmine the > encoding of a chunk of text 100% of the time mitigates against it. > The only approach I know of is a heuristic based approach. e.g. http://www.voidspace.org.uk/python/articles/guessing_encoding.shtml (Which was 'borrowed' from d

Re: [Python-Dev] Proposed unittest changes

2008-04-25 Thread Michael Foord
sert vs expect at first, but it has proven useful in the long run. As I said, I don't think this should be done now, maybe later. n I like this pattern. Michael Foord ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org

Re: [Python-Dev] [Doc-SIG] Double specification of function signatures?

2008-04-27 Thread Michael Foord
eaks to check in besides these. It seems that any documentation or help tool worth its salt should fetch the parameters from the definition and so including them in the docstring should be redundant duplication. Michael Foord Thx, Skip ___ Doc-

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

2008-05-04 Thread Michael Foord
breaking that expectation breaks my flow of code reading. I very *rarely* use lambdas in the form you show, but where you do I prefer them to the single line function. Michael Foord The difference in the result (the only one I know of) is that the code and function objects get the generic

<    4   5   6   7   8   9   10   11   >