Re: [Python-Dev] query: docstring formatting in python distutils code

2010-07-07 Thread Stephen J. Turnbull
Benjamin Peterson writes: > 2010/7/7 Stephen J. Turnbull : > > Antoine Pitrou writes: > > > >  > >   http://selenic.com/hg/file/tip/mercurial/minirst.py > >  > > >  > Given that Mercurial is GPL, this is probably of no use to us, > >  > unfortunately. > > > > Given that Martin apparently i

Re: [Python-Dev] Python equivalents in stdlib Was: Include datetime.py in stdlib or not?

2010-07-07 Thread Terry Reedy
On 7/7/2010 11:43 AM, Jesse Noller wrote: The idea is to put CPython on a more equal footing with the other implementations, I would reverse this to "The idea is to put the other implementations on a more equal footing with CPython." The subtle difference is the implication of whether the i

Re: [Python-Dev] Python equivalents in stdlib Was: Include datetime.py in stdlib or not?

2010-07-07 Thread Robert Collins
On pypi - testscenarios; Its been discussed on TIP before. Its a 'run a function to parameterise some tests' API, it changes the id() of the test to include the parameters, and it can be hooked in via load_tests quite trivially. Cheers, Rob ___ Python-D

Re: [Python-Dev] Python equivalents in stdlib Was: Include datetime.py in stdlib or not?

2010-07-07 Thread Michael Foord
On 08/07/2010 02:45, Terry Reedy wrote: On 7/7/2010 2:42 PM, Antoine Pitrou wrote: I wrote 4. Does not ctypes make it possible to replace a method of a Python-coded class with a faster C version, with something like try: connect to methods.dll methods.dll to be written check that function

Re: [Python-Dev] Python equivalents in stdlib Was: Include datetime.py in stdlib or not?

2010-07-07 Thread Terry Reedy
On 7/7/2010 2:42 PM, Antoine Pitrou wrote: I wrote 4. Does not ctypes make it possible to replace a method of a Python-coded class with a faster C version, with something like try: connect to methods.dll methods.dll to be written check that function xyx exists replace Somec

Re: [Python-Dev] Issue 2986: difflib.SequenceMatcher is partly broken

2010-07-07 Thread Terry Reedy
I had considered the possibility of option A for 2.7 and A & C for 3.2. But see below. Since posting, I did an experiment with a 700 char paragraph of text (the summary from the post) compared to an 'edited' version. I did the comparision with and without the current heuristic. I did not not

Re: [Python-Dev] query: docstring formatting in python distutils code

2010-07-07 Thread Benjamin Peterson
2010/7/7 Stephen J. Turnbull : > Antoine Pitrou writes: > >  > >   http://selenic.com/hg/file/tip/mercurial/minirst.py >  > >  > Given that Mercurial is GPL, this is probably of no use to us, >  > unfortunately. > > Given that Martin apparently is the only or main author, I don't see a > problem as

Re: [Python-Dev] query: docstring formatting in python distutils code

2010-07-07 Thread Stephen J. Turnbull
Antoine Pitrou writes: > > http://selenic.com/hg/file/tip/mercurial/minirst.py > > Given that Mercurial is GPL, this is probably of no use to us, > unfortunately. Given that Martin apparently is the only or main author, I don't see a problem as long as he's willing. Martin? __

Re: [Python-Dev] versioned .so files for Python 3.2

2010-07-07 Thread Matthias Klose
On 07.07.2010 20:40, Barry Warsaw wrote: Getting back to this after the US holiday. Thanks for running these numbers Scott. I've opened a bug in the Python tracker and attached my latest patch: http://bugs.python.org/issue9193 The one difference from previous versions of the patch is that the

Re: [Python-Dev] Python equivalents in stdlib Was: Include datetime.py in stdlib or not?

2010-07-07 Thread Benjamin Peterson
2010/7/7 Nick Coghlan : > On Thu, Jul 8, 2010 at 7:56 AM, Michael Foord > wrote: >> Using a class decorator to duplicate each _test_ into two test_* methods >> sounds  like a good approach. > > Note that parameterised methods have a similar problem to > parameterised modules - unittest results ar

Re: [Python-Dev] Python equivalents in stdlib Was: Include datetime.py in stdlib or not?

2010-07-07 Thread Alexander Belopolsky
On Wed, Jul 7, 2010 at 6:27 PM, Nick Coghlan wrote: .. > If you want to run the same module twice with different instances of > an imported module (or any other parameterised globals), creative use > of run_module() can provide module level scoping without completely > restructuring your tests. >

Re: [Python-Dev] Python equivalents in stdlib Was: Include datetime.py in stdlib or not?

2010-07-07 Thread Brett Cannon
On Wed, Jul 7, 2010 at 15:31, Nick Coghlan wrote: > On Thu, Jul 8, 2010 at 7:56 AM, Michael Foord > wrote: >> Using a class decorator to duplicate each _test_ into two test_* methods >> sounds  like a good approach. > > Note that parameterised methods have a similar problem to > parameterised mo

Re: [Python-Dev] Issue 2986: difflib.SequenceMatcher is partly broken

2010-07-07 Thread Terry Reedy
On 7/7/2010 4:11 PM, Tres Seaver wrote: Antoine Pitrou wrote: On Wed, 7 Jul 2010 19:44:31 +0200 Eli Bendersky wrote: For what it's worth, my benchmarking showed that modifying the heuristic to only kick in when there are more than 100 kinds of elements (Terry's option A) didn't affect the run

Re: [Python-Dev] Python equivalents in stdlib Was: Include datetime.py in stdlib or not?

2010-07-07 Thread Nick Coghlan
On Thu, Jul 8, 2010 at 7:56 AM, Michael Foord wrote: > Using a class decorator to duplicate each _test_ into two test_* methods > sounds  like a good approach. Note that parameterised methods have a similar problem to parameterised modules - unittest results are reported in terms of "testmodule.t

Re: [Python-Dev] Python equivalents in stdlib Was: Include datetime.py in stdlib or not?

2010-07-07 Thread Nick Coghlan
On Thu, Jul 8, 2010 at 7:36 AM, Brett Cannon wrote: >> Selecting one of two globally defined different subclasses will be >> ugly in parameterized tests. > > Didn't say it was a pretty solution. =) > >>  An in the other approach, the class >> definitions will have to be moved away from the module

Re: [Python-Dev] Include datetime.py in stdlib or not?

2010-07-07 Thread Terry Reedy
On 7/7/2010 3:32 PM, Brett Cannon wrote: That's the idea. We already have contributors from the various VMs who has commit privileges, but they all work in their own repos for convenience. My hope is that if we break the stdlib out into its own repository that people simply pull in then other VM

Re: [Python-Dev] versioned .so files for Python 3.2

2010-07-07 Thread Nick Coghlan
On Thu, Jul 8, 2010 at 4:40 AM, Barry Warsaw wrote: > I'd like to get consensus as to whether folks feel that a PEP is needed.  My > own thought is that I'd rather not do a PEP specific to this change, but I > would update PEP 384 with the implications on .so versioning.  Please also > feel free t

Re: [Python-Dev] query: docstring formatting in python distutils code

2010-07-07 Thread Fred Drake
On Wed, Jul 7, 2010 at 4:58 PM, Georg Brandl wrote: > Let's say we were okay with giving up single-source docs, It's not clear that this is a goal. > one potential > problem is that autodoc needs to import the modules in question, which > can become a problem, on one hand for platform-specific m

Re: [Python-Dev] Python equivalents in stdlib Was: Include datetime.py in stdlib or not?

2010-07-07 Thread Alexander Belopolsky
On Wed, Jul 7, 2010 at 5:56 PM, Michael Foord wrote: .. >> Well, I personally would call that bad form to import those classes >> explicitly, but that's just me. You will simply need to make them work >> off of the module object. There is nothing wrong with "cleaning up" >> the tests as part of yo

Re: [Python-Dev] Python equivalents in stdlib Was: Include datetime.py in stdlib or not?

2010-07-07 Thread Michael Foord
On 07/07/2010 21:33, Brett Cannon wrote: On Wed, Jul 7, 2010 at 13:16, Alexander Belopolsky wrote: On Wed, Jul 7, 2010 at 3:45 PM, Brett Cannon wrote: On Wed, Jul 7, 2010 at 08:29, Alexander Belopolsky wrote: .. For datetime.py this approach presents several probl

Re: [Python-Dev] versioned .so files for Python 3.2

2010-07-07 Thread John Arbash Meinel
Scott Dial wrote: > On 6/30/2010 2:53 PM, Barry Warsaw wrote: >> It might be amazing, but it's still a significant overhead. As I've >> described, multiply that by all the py files in all the distro packages >> containing Python source code, and then still try to fit it on a CDROM. > > I decided

Re: [Python-Dev] query: docstring formatting in python distutils code

2010-07-07 Thread Michael Foord
On 07/07/2010 21:54, Georg Brandl wrote: Am 07.07.2010 20:12, schrieb Barry Warsaw: On Jul 07, 2010, at 07:30 PM, Georg Brandl wrote: Overall, I think that we can make stdlib docstrings valid reST -- even if it's reST without much markup -- but valid, so that people pulling in stdlib

Re: [Python-Dev] Python equivalents in stdlib Was: Include datetime.py in stdlib or not?

2010-07-07 Thread Brett Cannon
On Wed, Jul 7, 2010 at 13:53, Alexander Belopolsky wrote: > On Wed, Jul 7, 2010 at 4:33 PM, Brett Cannon wrote: > > 2. There are test classes defined at the test_datetime module level > that subclass from datetime classes.  The self.module is not available > at the module level.  Thes

Re: [Python-Dev] query: docstring formatting in python distutils code

2010-07-07 Thread Antoine Pitrou
On Wed, 07 Jul 2010 22:58:47 +0200 Martin Geisler wrote: > "C. Titus Brown" writes: > > > I guess docutils isn't in the stdlib (should it be?) or else we could > > modify 'help' to use it to prepare a straight text formatting. > > We're using light-weight ReST markup in the Mercurial help text

Re: [Python-Dev] query: docstring formatting in python distutils code

2010-07-07 Thread Georg Brandl
Am 07.07.2010 21:52, schrieb Brett Cannon: > On Wed, Jul 7, 2010 at 10:30, Georg Brandl wrote: >> Am 07.07.2010 18:09, schrieb Michael Foord: Hi all, over on the fellowship o' the packaging mailing list, one of our GSoC students (merwok) asked about how much f

Re: [Python-Dev] versioned .so files for Python 3.2

2010-07-07 Thread Georg Brandl
Am 07.07.2010 20:40, schrieb Barry Warsaw: > Getting back to this after the US holiday. Thanks for running these numbers > Scott. I've opened a bug in the Python tracker and attached my latest patch: > > http://bugs.python.org/issue9193 > > The one difference from previous versions of the patc

Re: [Python-Dev] query: docstring formatting in python distutils code

2010-07-07 Thread Georg Brandl
Am 07.07.2010 21:11, schrieb Fred Drake: > On Wed, Jul 7, 2010 at 2:27 PM, Georg Brandl wrote: >> I know, and this is what I originally intended for Sphinx. However, the >> calls >> for automatic doc generation are very loud, and it's understandable that most >> project can't afford writing thei

Re: [Python-Dev] query: docstring formatting in python distutils code

2010-07-07 Thread Martin Geisler
"C. Titus Brown" writes: > I guess docutils isn't in the stdlib (should it be?) or else we could > modify 'help' to use it to prepare a straight text formatting. We're using light-weight ReST markup in the Mercurial help texts and transform it into straight text upon display in the terminal. We

Re: [Python-Dev] query: docstring formatting in python distutils code

2010-07-07 Thread Georg Brandl
Am 07.07.2010 20:12, schrieb Barry Warsaw: > On Jul 07, 2010, at 07:30 PM, Georg Brandl wrote: > >>Overall, I think that we can make stdlib docstrings valid reST -- even >>if it's reST without much markup -- but valid, so that people pulling >>in stdlib doc- strings into Sphinx docs won't get ugly

Re: [Python-Dev] Python equivalents in stdlib Was: Include datetime.py in stdlib or not?

2010-07-07 Thread Alexander Belopolsky
On Wed, Jul 7, 2010 at 4:33 PM, Brett Cannon wrote: 2. There are test classes defined at the test_datetime module level that subclass from datetime classes.  The self.module is not available at the module level.  These should probably be moved to setUp() methods and attached t

Re: [Python-Dev] Python equivalents in stdlib Was: Include datetime.py in stdlib or not?

2010-07-07 Thread Brett Cannon
On Wed, Jul 7, 2010 at 13:16, Alexander Belopolsky wrote: > On Wed, Jul 7, 2010 at 3:45 PM, Brett Cannon wrote: >> On Wed, Jul 7, 2010 at 08:29, Alexander Belopolsky >> wrote: > .. >>> For datetime.py this approach presents several problems: >>> >>> 1. replacing datetime with self.module.datetim

Re: [Python-Dev] Python equivalents in stdlib Was: Include datetime.py in stdlib or not?

2010-07-07 Thread Alexander Belopolsky
On Wed, Jul 7, 2010 at 3:45 PM, Brett Cannon wrote: > On Wed, Jul 7, 2010 at 08:29, Alexander Belopolsky > wrote: .. >> For datetime.py this approach presents several problems: >> >> 1. replacing datetime with self.module.datetime everywhere can get >> messy quickly. >> 2. There are test classes

Re: [Python-Dev] Issue 2986: difflib.SequenceMatcher is partly broken

2010-07-07 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Antoine Pitrou wrote: > On Wed, 7 Jul 2010 19:44:31 +0200 > Eli Bendersky wrote: >> For what it's worth, my benchmarking showed that modifying the >> heuristic to only kick in when there are more than 100 kinds of >> elements (Terry's option A) didn't

Re: [Python-Dev] query: docstring formatting in python distutils code

2010-07-07 Thread Brett Cannon
On Wed, Jul 7, 2010 at 10:30, Georg Brandl wrote: > Am 07.07.2010 18:09, schrieb Michael Foord: >>>     Hi all, >>> >>>     over on the fellowship o' the packaging mailing list, one of our GSoC >>> students >>>     (merwok) asked about how much formatting info should go into Python >>> stdlib >>

Re: [Python-Dev] query: docstring formatting in python distutils code

2010-07-07 Thread Brett Cannon
On Wed, Jul 7, 2010 at 11:46, Antoine Pitrou wrote: > On Wed, 7 Jul 2010 14:12:17 -0400 > Barry Warsaw wrote: >> On Jul 07, 2010, at 07:30 PM, Georg Brandl wrote: >> >> >Overall, I think that we can make stdlib docstrings valid reST -- even >> >if it's reST without much markup -- but valid, so th

Re: [Python-Dev] Python equivalents in stdlib Was: Include datetime.py in stdlib or not?

2010-07-07 Thread Brett Cannon
On Wed, Jul 7, 2010 at 08:29, Alexander Belopolsky wrote: > On Tue, Jul 6, 2010 at 11:54 PM, Terry Reedy wrote: >> On 7/6/2010 3:59 PM, Alexander Belopolsky wrote: >> >> I am more interested in Brett's overall vision than this particular module. >> I understand that to be one of a stdlib that is

Re: [Python-Dev] Include datetime.py in stdlib or not?

2010-07-07 Thread Brett Cannon
On Tue, Jul 6, 2010 at 20:54, Terry Reedy wrote: > On 7/6/2010 3:59 PM, Alexander Belopolsky wrote: > > I am more interested in Brett's overall vision than this particular module. > I understand that to be one of a stdlib that is separate from CPython and is > indeed the standard Python library. >

Re: [Python-Dev] query: docstring formatting in python distutils code

2010-07-07 Thread Fred Drake
On Wed, Jul 7, 2010 at 2:27 PM, Georg Brandl wrote: > I know, and this is what I originally intended for Sphinx.  However, the calls > for automatic doc generation are very loud, and it's understandable that most > project can't afford writing their documentation twice. The ability to provide ext

Re: [Python-Dev] Python equivalents in stdlib Was: Include datetime.py in stdlib or not?

2010-07-07 Thread Alexander Belopolsky
On Wed, Jul 7, 2010 at 2:42 PM, Antoine Pitrou wrote: .. > Except that ctypes doesn't help provide C extensions at all. It only > helps provide wrappers around existing C libraries, which is quite a > different thing. Yet it may allow writing an equivalent of a C extension in pure python. For e

Re: [Python-Dev] query: docstring formatting in python distutils code

2010-07-07 Thread Antoine Pitrou
On Wed, 7 Jul 2010 14:12:17 -0400 Barry Warsaw wrote: > On Jul 07, 2010, at 07:30 PM, Georg Brandl wrote: > > >Overall, I think that we can make stdlib docstrings valid reST -- even > >if it's reST without much markup -- but valid, so that people pulling > >in stdlib doc- strings into Sphinx docs

Re: [Python-Dev] query: docstring formatting in python distutils code

2010-07-07 Thread Alexander Belopolsky
On Wed, Jul 7, 2010 at 2:12 PM, Barry Warsaw wrote: .. > Does it make sense to add (reST-style) epydoc markup for API signatures? > E.g. > > def create_foo(name, parent=None): >    """Create the named foo. > >    The named foo must not already exist, but if optional `parent` is given, >    it must

Re: [Python-Dev] Python equivalents in stdlib Was: Include datetime.py in stdlib or not?

2010-07-07 Thread Antoine Pitrou
On Wed, 07 Jul 2010 16:39:38 +0100 Michael Foord wrote: > On 07/07/2010 16:29, Alexander Belopolsky wrote: > > [snip...] > > > >> 4. Does not ctypes make it possible to replace a method of a Python-coded > >> class with a faster C version, with something like > >> try: > >> connect to method

Re: [Python-Dev] versioned .so files for Python 3.2

2010-07-07 Thread Barry Warsaw
On Jul 01, 2010, at 07:02 AM, Scott Dial wrote: >I decided to prove to myself that it was not a significant issue to >have parallel directory structures in a .tar.bz2, and I was surprised >to find it much worse at that then I had imagined. For example, > ># cd /usr/lib/python2.6/site-packages ># t

Re: [Python-Dev] Issue 2986: difflib.SequenceMatcher is partly broken

2010-07-07 Thread Antoine Pitrou
On Wed, 7 Jul 2010 19:44:31 +0200 Eli Bendersky wrote: > > For what it's worth, my benchmarking showed that modifying the > heuristic to only kick in when there are more than 100 kinds of > elements (Terry's option A) didn't affect the runtime of matching > whatsoever, even when the heuristic *do

Re: [Python-Dev] Include datetime.py in stdlib or not?

2010-07-07 Thread Alexander Belopolsky
On Tue, Jul 6, 2010 at 11:54 PM, Terry Reedy wrote: > On 7/6/2010 3:59 PM, Alexander Belopolsky wrote: [.. skipping more general stdlib discussion see "Python equivalents in stdlib" thread ..] >> 2. There are other areas of stdlib that can benefit more from pure >> python equivalents. > > Possibl

Re: [Python-Dev] query: docstring formatting in python distutils code

2010-07-07 Thread Georg Brandl
Am 07.07.2010 19:53, schrieb Éric Araujo: >> I promised to write a PEP about that some time in the future. (Probably >> after >> 3.2 final.) > > Nice. > > It seems that projects putting Sphinxy reST in their doc are using > automatic doc generation. This is however not always the best way to >

Re: [Python-Dev] query: docstring formatting in python distutils code

2010-07-07 Thread Robert Kern
On 7/7/10 1:53 PM, Éric Araujo wrote: I promised to write a PEP about that some time in the future. (Probably after 3.2 final.) Nice. It seems that projects putting Sphinxy reST in their doc are using automatic doc generation. This is however not always the best way to make good doc, as demon

Re: [Python-Dev] query: docstring formatting in python distutils code

2010-07-07 Thread Barry Warsaw
On Jul 07, 2010, at 07:30 PM, Georg Brandl wrote: >Overall, I think that we can make stdlib docstrings valid reST -- even >if it's reST without much markup -- but valid, so that people pulling >in stdlib doc- strings into Sphinx docs won't get ugly warnings. > >What I would *not* like to see is he

Re: [Python-Dev] query: docstring formatting in python distutils code

2010-07-07 Thread Éric Araujo
> I promised to write a PEP about that some time in the future. (Probably after > 3.2 final.) Nice. It seems that projects putting Sphinxy reST in their doc are using automatic doc generation. This is however not always the best way to make good doc, as demonstrated by Python’s hand-written, ver

Re: [Python-Dev] Issue 2986: difflib.SequenceMatcher is partly broken

2010-07-07 Thread Eli Bendersky
> Rather than reverting to Tim's > undocumented vision, perhaps we should better articulate it by > separating the general purpose matcher from an optimised text matcher. > For what it's worth, my benchmarking showed that modifying the heuristic to only kick in when there are more than 100 kinds o

Re: [Python-Dev] Licensing

2010-07-07 Thread Guido van Rossum
On Wed, Jul 7, 2010 at 2:48 PM, Nick Coghlan wrote: > On Wed, Jul 7, 2010 at 2:59 PM, Guido van Rossum wrote: >> On Tue, Jul 6, 2010 at 11:27 PM, Nick Coghlan wrote: >>> For example, if you look at some of the code that even Guido has >>> submitted (e.g. pgen2), that's actually come in under Goo

Re: [Python-Dev] query: docstring formatting in python distutils code

2010-07-07 Thread Senthil Kumaran
On Wed, Jul 7, 2010 at 11:00 PM, Georg Brandl wrote: > Agreed.  However, reST doesn't need to be less readable if the specific > inline markup is not used.  For example, using `identifier` to refer to a > function or *var* to refer to a variable (which is already done at quite a > few places) is v

Re: [Python-Dev] query: docstring formatting in python distutils code

2010-07-07 Thread Georg Brandl
Am 07.07.2010 18:09, schrieb Michael Foord: >> Hi all, >> >> over on the fellowship o' the packaging mailing list, one of our GSoC >> students >> (merwok) asked about how much formatting info should go into Python >> stdlib >> docstrings. Right now the stdlib docstrings are prima

Re: [Python-Dev] Issue 2986: difflib.SequenceMatcher is partly broken

2010-07-07 Thread Tim Peters
[Nick Coghlan] > ... > Hmm, I've been using difflib.SequenceMatcher for years in a serial bit > error rate tester (with typical message sizes ranging from tens of > bytes to tens of thousands of bytes) that occasionally gives > unexpected results. I'd been blaming hardware glitches (and, to be > fa

Re: [Python-Dev] query: docstring formatting in python distutils code

2010-07-07 Thread Shashwat Anand
On Wed, Jul 7, 2010 at 9:39 PM, Michael Foord wrote: > On 07/07/2010 17:06, Shashwat Anand wrote: > > > > On Wed, Jul 7, 2010 at 9:24 PM, C. Titus Brown wrote: > >> Hi all, >> >> over on the fellowship o' the packaging mailing list, one of our GSoC >> students >> (merwok) asked about how much fo

Re: [Python-Dev] query: docstring formatting in python distutils code

2010-07-07 Thread C. Titus Brown
On Wed, Jul 07, 2010 at 05:09:40PM +0100, Michael Foord wrote: > On 07/07/2010 17:06, Shashwat Anand wrote: >> On Wed, Jul 7, 2010 at 9:24 PM, C. Titus Brown > > wrote: >> >> Hi all, >> >> over on the fellowship o' the packaging mailing list, one of our >> GSoC stud

Re: [Python-Dev] query: docstring formatting in python distutils code

2010-07-07 Thread Michael Foord
On 07/07/2010 17:06, Shashwat Anand wrote: On Wed, Jul 7, 2010 at 9:24 PM, C. Titus Brown > wrote: Hi all, over on the fellowship o' the packaging mailing list, one of our GSoC students (merwok) asked about how much formatting info should go into Pyth

Re: [Python-Dev] query: docstring formatting in python distutils code

2010-07-07 Thread C. Titus Brown
On Wed, Jul 07, 2010 at 09:36:10PM +0530, Shashwat Anand wrote: > On Wed, Jul 7, 2010 at 9:24 PM, C. Titus Brown wrote: > > > Hi all, > > > > over on the fellowship o' the packaging mailing list, one of our GSoC > > students > > (merwok) asked about how much formatting info should go into Python

Re: [Python-Dev] query: docstring formatting in python distutils code

2010-07-07 Thread Shashwat Anand
On Wed, Jul 7, 2010 at 9:24 PM, C. Titus Brown wrote: > Hi all, > > over on the fellowship o' the packaging mailing list, one of our GSoC > students > (merwok) asked about how much formatting info should go into Python stdlib > docstrings. Right now the stdlib docstrings are primarily text, AFAI

[Python-Dev] query: docstring formatting in python distutils code

2010-07-07 Thread C. Titus Brown
Hi all, over on the fellowship o' the packaging mailing list, one of our GSoC students (merwok) asked about how much formatting info should go into Python stdlib docstrings. Right now the stdlib docstrings are primarily text, AFAIK; but with the switch to Sphinx for the official Python docs, shou

Re: [Python-Dev] Python equivalents in stdlib Was: Include datetime.py in stdlib or not?

2010-07-07 Thread Jesse Noller
On Wed, Jul 7, 2010 at 11:29 AM, Alexander Belopolsky wrote: > On Tue, Jul 6, 2010 at 11:54 PM, Terry Reedy wrote: >> On 7/6/2010 3:59 PM, Alexander Belopolsky wrote: >> >> I am more interested in Brett's overall vision than this particular module. >> I understand that to be one of a stdlib that

Re: [Python-Dev] thoughts on the bytes/string discussion

2010-07-07 Thread Stephen J. Turnbull
Greg Ewing writes: > The use cases I had in mind for a 1-byte build are those for > which the alternative would be keeping everything in bytes. > Applications using a 1-byte build would need to be aware of > the fact and take care to slice strings at valid places. If > they were using bytes,

Re: [Python-Dev] Python equivalents in stdlib Was: Include datetime.py in stdlib or not?

2010-07-07 Thread Michael Foord
On 07/07/2010 16:29, Alexander Belopolsky wrote: [snip...] 4. Does not ctypes make it possible to replace a method of a Python-coded class with a faster C version, with something like try: connect to methods.dll check that function xyx exists replace Someclass.xyy with ctypes wrap

[Python-Dev] Python equivalents in stdlib Was: Include datetime.py in stdlib or not?

2010-07-07 Thread Alexander Belopolsky
On Tue, Jul 6, 2010 at 11:54 PM, Terry Reedy wrote: > On 7/6/2010 3:59 PM, Alexander Belopolsky wrote: > > I am more interested in Brett's overall vision than this particular module. > I understand that to be one of a stdlib that is separate from CPython and is > indeed the standard Python library

Re: [Python-Dev] Issue 2986: difflib.SequenceMatcher is partly broken

2010-07-07 Thread Nick Coghlan
On Wed, Jul 7, 2010 at 9:18 AM, Terry Reedy wrote: > In the commit message for revision 26661, which added the heuristic, Tim > Peters wrote "While I like what I've seen of the effects so far, I still > consider this experimental.  Please give it a try!" Several people who have > tried it discover

Re: [Python-Dev] Licensing

2010-07-07 Thread Nick Coghlan
On Wed, Jul 7, 2010 at 2:59 PM, Guido van Rossum wrote: > On Tue, Jul 6, 2010 at 11:27 PM, Nick Coghlan wrote: >> For example, if you look at some of the code that even Guido has >> submitted (e.g. pgen2), that's actually come in under Google's >> contributor agreement, rather than Guido's person

Re: [Python-Dev] Issue 2986: difflib.SequenceMatcher is partly broken

2010-07-07 Thread Antoine Pitrou
On Tue, 06 Jul 2010 19:18:09 -0400 Terry Reedy wrote: > > Version A: Modify the heuristic to only eliminate common items when > there are more than, say, 100 items (when len(b2j)> 100 where b2j is > first calculated without popularity deletions). [...] > > Version B: add a parameter to .__init

Re: [Python-Dev] thoughts on the bytes/string discussion

2010-07-07 Thread Antoine Pitrou
On Wed, 07 Jul 2010 11:13:09 +0200 "M.-A. Lemburg" wrote: > > And finally: RAM is cheap and today's CPUs work better with 16- or > 32-bit values than 8-bit characters. The latter is wrong. There is no cost in accessing bytes rather than words on modern CPUs. (actually, bytes are cheaper overall

Re: [Python-Dev] thoughts on the bytes/string discussion

2010-07-07 Thread Greg Ewing
M.-A. Lemburg wrote: Note that using UTF-8 as internal storage format would not work in Python, since Python is a Unicode producer, i.e. it needs to be able to generate and work with code points that are not allowed in UTF-8, e.g. lone surrogates. Well, it wouldn't strictly be UTF-8, any more

Re: [Python-Dev] Mercurial migration readiness

2010-07-07 Thread Dirkjan Ochtman
On Wed, Jul 7, 2010 at 01:47, anatoly techtonik wrote: > That would be nice to hear about in more detail. As I understand there > is no place where it is described. I already see +1 from Fred Drake > and another +1 from Steve Holden down the thread. > > However, Antoine Pitrou, Dirkjan Ochtman and

Re: [Python-Dev] thoughts on the bytes/string discussion

2010-07-07 Thread M.-A. Lemburg
Ronald Oussoren wrote: > > On 27 Jun, 2010, at 11:48, Greg Ewing wrote: > >> Stefan Behnel wrote: >>> Greg Ewing, 26.06.2010 09:58: Would there be any sanity in having an option to compile Python with UTF-8 as the internal string representation? >>> It would break Py_UNICODE, because th

Re: [Python-Dev] Mercurial migration readiness

2010-07-07 Thread Éric Araujo
>> Because it's not a transition. It's a mirror. It was put in place >> before the hg migration plan was accepted, IIRC. > Where is this migration plan then if it is not in PEP? The “hg migration plan” is PEP 385. It means moving from svn.python.org to hg.python.org. It is not possible to make co

Re: [Python-Dev] Issue 2986: difflib.SequenceMatcher is partly broken

2010-07-07 Thread Eli Bendersky
[snip] > Yes, that was the intent.  I was corresponding with a user at the time > who had odd notions (well, by my standards) of how to format C code, > which left him with many hundreds of lines containing only an open > brace, or a close brace, or just a semicolon (etc).  difflib spun its > wheel