Re: [Python-Dev] buffer interface for C extensions

2008-05-19 Thread Dan Lenski
On Sun, 18 May 2008 22:59:05 +, Dan Lenski wrote: > So here's what I don't understand. Why doesn't the "t#" argument > specifier support read-write buffers as well as read-only buffers? > Aren't read-write buffers a *superset* of read-only buffers?? Is

Re: [Python-Dev] buffer interface for C extensions

2008-05-22 Thread Dan Lenski
On Thu, 22 May 2008 23:10:09 +0200, M.-A. Lemburg wrote: > On 2008-05-19 00:59, Dan Lenski wrote: > You should probably ask such questions on the capi-sig list. > > To answer your question: > > t# requires support for the read-only 8-bit character buffer interface > s# ca

Re: [Python-Dev] Should we move to replace re with regex?

2011-08-26 Thread Dan Stromberg
On Fri, Aug 26, 2011 at 2:45 PM, Guido van Rossum wrote: > ...but on second thought I wonder if maybe regex is > mature enough to replace re in Python 3.3. > I agree that the move from regex to re was kind of painful. It seems someone should merge the unit tests for re and regex, and apply the

Re: [Python-Dev] Should we move to replace re with regex?

2011-08-26 Thread Dan Stromberg
On Fri, Aug 26, 2011 at 5:08 PM, Antoine Pitrou wrote: > On Fri, 26 Aug 2011 15:48:42 -0700 > Dan Stromberg wrote: > > > > Then there probably should be a from __future__ import for a while. > > If you are willing to use a "from __future__ import", why no

Re: [Python-Dev] Should we move to replace re with regex?

2011-08-26 Thread Dan Stromberg
On Fri, Aug 26, 2011 at 8:47 PM, Steven D'Aprano wrote: > Antoine Pitrou wrote: > >> On Fri, 26 Aug 2011 17:25:56 -0700 >> Dan Stromberg wrote: >> > If you add regex as "import regex", and the new regex module doesn't work > >> out, regex m

Re: [Python-Dev] Should we move to replace re with regex?

2011-08-27 Thread Dan Stromberg
On Sat, Aug 27, 2011 at 9:19 AM, Guido van Rossum wrote: > On Fri, Aug 26, 2011 at 11:01 PM, Dan Stromberg > wrote: > [Steven] > >> Have then been any __future__ features that were added provisionally? > > > > I can't either, but ISTR hearing that from __f

Re: [Python-Dev] Should we move to replace re with regex?

2011-08-27 Thread Dan Stromberg
On Sat, Aug 27, 2011 at 9:53 AM, Brian Curtin wrote: > On Sat, Aug 27, 2011 at 11:48, Dan Stromberg wrote: >> >> No, this was not the intent of __future__. The intent is that a >>> feature is desirable but also backwards incompatible (e.g. introduces >>> a new

Re: [Python-Dev] LZMA compression support in 3.3

2011-08-27 Thread Dan Stromberg
On Sat, Aug 27, 2011 at 9:04 AM, Nick Coghlan wrote: > On Sun, Aug 28, 2011 at 1:58 AM, Nadeem Vawda > wrote: > > On Sat, Aug 27, 2011 at 5:52 PM, Nick Coghlan > wrote: > >> It's acceptable for the Python version to use ctypes in the case of > >> wrapping an existing library, but the Python ver

Re: [Python-Dev] LZMA compression support in 3.3

2011-08-27 Thread Dan Stromberg
On Sat, Aug 27, 2011 at 1:21 PM, "Martin v. Löwis" wrote: > > I'd like to better understand why ctypes is (sometimes) frowned upon. > > > > Is it the brittleness? Tendency to segfault? > > That, and Python should work completely if ctypes is not available. > What are the most major platforms cty

Re: [Python-Dev] LZMA compression support in 3.3

2011-08-27 Thread Dan Stromberg
On Sat, Aug 27, 2011 at 2:38 PM, Nadeem Vawda wrote: > On Sat, Aug 27, 2011 at 10:41 PM, Dan Stromberg > wrote: > > It seems like there should be some way of coming up with an xml file > > describing the types of the various bits of data and formal arguments - > >

Re: [Python-Dev] LZMA compression support in 3.3

2011-08-27 Thread Dan Stromberg
On Sat, Aug 27, 2011 at 3:26 PM, Antoine Pitrou wrote: > On Sat, 27 Aug 2011 15:14:15 -0700 > Dan Stromberg wrote: > > > On Sat, Aug 27, 2011 at 2:38 PM, Nadeem Vawda >wrote: > > > > > On Sat, Aug 27, 2011 at 10:41 PM, Dan Stromberg > > > wrote: >

Re: [Python-Dev] LZMA compression support in 3.3

2011-08-27 Thread Dan Stromberg
On Sat, Aug 27, 2011 at 4:27 PM, Antoine Pitrou wrote: > > Sure. Now please convince Linux distributions first, because this > particular subthread is going nowhere. > I hope you're not a solipsist. Anyway, if the mere -discussion- of embracing a standard and safe way of making C libraries call

Re: [Python-Dev] LZMA compression support in 3.3

2011-08-27 Thread Dan Stromberg
On Sat, Aug 27, 2011 at 4:27 PM, Antoine Pitrou wrote: > On Sat, 27 Aug 2011 16:19:01 -0700 > Dan Stromberg wrote: > > 2) It's a rather arbitrary distinction that's being drawn between dev and > > nondev today. There's no particular reason why the line could

Re: [Python-Dev] LZMA compression support in 3.3

2011-08-27 Thread Dan Stromberg
On Sat, Aug 27, 2011 at 8:57 PM, Guido van Rossum wrote: > On Sat, Aug 27, 2011 at 3:14 PM, Dan Stromberg > wrote: > > IMO, we really, really need some common way of accessing C libraries that > > works for all major Python variants. > > We have one. It's calle

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

2011-09-01 Thread Dan Stromberg
On Tue, Aug 30, 2011 at 10:05 AM, Guido van Rossum wrote: > On Tue, Aug 30, 2011 at 9:49 AM, "Martin v. Löwis" > wrote: > The problem lies with the PyPy backend -- there it generates ctypes > code, which means that the signature you declare to Cython/Pyrex must > match the *linker* level API, n

Re: [Python-Dev] defaultdict proposal round three

2006-02-20 Thread Dan Gass
actory = lambda k : list() d.default_factory = lambda k : 0 Dan Gass ___ 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/archive%40mail-archive.com

Re: [Python-Dev] a note in random.shuffle.__doc__ ...

2006-06-13 Thread Dan Christensen
(old) text in the docstring: Note that for even rather small len(x), the total number of permutations of x is larger than the period of most random number generators; this implies that "most" permutations of a long sequence can never be generated. is at

Re: [Python-Dev] __file__ is not always an absolute path

2010-02-17 Thread Dan Villiom Podlaski Christiansen
10 loops, best of 3: 11 usec per loop For maximum reproducibility, I used the stock Python 2.6.1 included in Mac OS X 10.6.2. In other words ‘os.getcwd()’ is more than fifty times as slow as a regular function call when using Mac OS X. -- Dan Villiom Podlaski Christiansen dan...@gmail.com sm

Re: [Python-Dev] os.path.normcase rationale?

2010-10-03 Thread Dan Villiom Podlaski Christiansen
;>> F_GETPATH = 50 >>> >>> if exists('/tmp/å'): ... remove('/tmp/å') ... >>> open('/tmp/å', 'w').close() >>> f = open(b'/tmp/A\xcc\x8a') >>> >>> a = f.name >>> b = fcntl(f,

[Python-Dev] Re: PEP 646 (Variadic Generics): final call for comments

2021-08-06 Thread Dan Moldovan via Python-Dev
this issue: https://github.com/tensorflow/tensorflow/issues/31579). Variadic generics are among the last few missing pieces to create an elegant set of type definitions for tensors and shapes. Best, Dan Moldovan Software Engineer, TensorFlow Dev Team ___ P

[Python-Dev] Re: PEP 646 (Variadic Generics): final call for comments

2021-08-09 Thread Dan Moldovan via Python-Dev
this issue: https://github.com/tensorflow/tensorflow/issues/31579). Variadic generics are among the last few missing pieces to create an elegant set of type definitions for tensors and shapes. Best, Dan Moldovan Senior Software Engineer, TensorFlow Dev

<    1   2