Re: [Python-Dev] String conversion issues implementing new curses module method addchstr, etc.

2009-02-26 Thread Ulrich Eckhardt
On Wednesday 25 February 2009, Heracles wrote: > addchstr((chtype*)PyString_AsString(pS)) You are effectively disabling the well-deserved warnings with the cast here. Don't do that. > Now the thing is that when I make calls from python like so: > >curses.addchstr(5,10, "@ < Row 5, Col 10") [

[Python-Dev] sequence slice that wraps, bug or intention?

2009-04-03 Thread Ulrich Eckhardt
Hi! I just stumbled across something in Python 2.6 where I'm not sure if it is by design or a fault: x = 'abdc' x[-3:-3] -> '' x[-3:-2] -> 'b' x[-3:-1] -> 'bc' x[-3: 0] -> '' The one that actually bothers me here is the last one, I would have expected it to yield 'bcd' instead, because otherwi

Re: [Python-Dev] Python on PowerPC?

2009-05-20 Thread Ulrich Eckhardt
On Wednesday 20 May 2009, Chris Plasun wrote: > I'm to develop console apps on a Linux embedded PowerPC board (Freescale > MPC8313). > > Is there a Python release for the PowerPC platform? This has pretty little to do with the development of the Python language itself, so it is rather off topic h

Re: [Python-Dev] Clean up Python/thread_*.h ?

2009-10-26 Thread Ulrich Eckhardt
On Saturday 24 October 2009, Christian Heimes wrote: > Antoine Pitrou wrote: > > * The unused file: thread_wince.h > > > > Windows CE has actually been using thread_nt.h since January 2009 (see > > http://bugs.python.org/issue4893 ). thread_wince.h is still there, but > > it's unused and grep bring

Re: [Python-Dev] standard libraries don't behave like standard 'libraries'

2009-11-12 Thread Ulrich Eckhardt
On Thursday 12 November 2009, Sriram Srinivasan wrote: > I don't know if you have used Dev-C++. It has a 'package management' > mechanism for the standard libraries. I disagree. It has a package management system for libraries, not for the standard libraries. The point is that the Python standard

Re: [Python-Dev] patch to make list.pop(0) work in O(1) time

2010-01-28 Thread Ulrich Eckhardt
On Tuesday 26 January 2010, Steve Howell wrote: > Here are the benefits of an O(1) implementation. [...] > Did I leave anything out? Good summary, Steve, thanks! Anyway, you left two out: * Inserting at the front gets the same complexity as inserting at the back. * Inserting and erasing anywh

Re: [Python-Dev] Drive suffix

2010-08-04 Thread Ulrich Eckhardt
On Wednesday 04 August 2010, Rob Cliffe wrote: > As it happens, what sparked the question was trying to determine in a > platform-independent way whether a path consisted of a bare drive > specification (e.g. "C:"). I guess > os.path.splitdrive(MyPath)[1] == "" > takes care of that. "platform

Re: [Python-Dev] new buffer in python2.7

2010-10-27 Thread Ulrich Eckhardt
On Wednesday 27 October 2010, Kristján Valur Jónsson wrote: > Although 2.7 has the new buffer interface and memoryview objects, these are > widely not accepted in the built in modules. Examples are the structmodule, > some of the socketmodule apis, structmodule, etc. > > IMHO this is unfortunate.

Re: [Python-Dev] Removal of Win32 ANSI API

2010-11-11 Thread Ulrich Eckhardt
On Thursday 11 November 2010, Hirokazu Yamamoto wrote: > Is it possible to remove Win32 ANSI API (ie: GetFileAttributesA) > and only use Win32 WIDE API (ie: GetFileAttributesW)? > Mainly in posixmodule.c. > I think we can simplify the code hugely. +1 MS Windows variants that only support the ANSI

Re: [Python-Dev] python 2 for building python 3

2010-12-06 Thread Ulrich Eckhardt
On Saturday 04 December 2010, Antoine Pitrou wrote: > Perhaps SVN doesn't get timestamps right. SVN doesn't touch timestamps explicitly, it just writes the files as they come and the system gives them the timestamps. This also makes sense, because the build system depends on them - you don't wan

Re: [Python-Dev] Bugs in thread_nt.h

2011-03-10 Thread Ulrich Eckhardt
On Thursday 10 March 2011, Sturla Molden wrote: > As for InterlockedCompareExchange et al., MSDN says this: "The > parameters for this function must be aligned on a 32-bit boundary; bit != byte Uli ** Domino La

[Python-Dev] time.sleep(-1) behaviour

2011-06-30 Thread Ulrich Eckhardt
Hi! This is a request for clarification for the thread "how to call a function for evry 10 seconds" from the user mailinglist/newsgroup. The gist is this: 1. On Linux/Python 2.6, time.sleep(-1.0) raises an IOError. 2. On MS Windows/Python 2.5 or 2.7 this sleeps forever. It seems that convertin

Re: [Python-Dev] time.sleep(-1) behaviour

2011-06-30 Thread Ulrich Eckhardt
On Thursday 30 June 2011, R. David Murray wrote: > Please file a bug report at bugs.python.org. Filed as bug #12459. Uli ** Domino Laser GmbH, Fangdieckstraße 75a, 22547 Hamburg, Deutschland Geschäftsführer: Thor

Re: [Python-Dev] [Python-checkins] cpython: no one passes NULL here (or should anyway)

2011-07-13 Thread Ulrich Eckhardt
On Monday 04 July 2011, Benjamin Peterson wrote: > If someone's static analysis tool starts complaining about it, I'd be > happy to consider adding an assert... Here is one! To me an assertion is what actually documents that you don't expect NULL in this context and that the missing check is not

[Python-Dev] Status of MS Windows CE port

2008-09-23 Thread Ulrich Eckhardt
Greetings! I'm currently trying to assess the effort required for a CE port. I'm already aware of the project at http://pythonce.sourceforge.net, but I find it a waste of time to have two separate projects which then require syncing changes back and forth. Questions: - What are the feelings to

Re: [Python-Dev] Status of MS Windows CE port

2008-09-25 Thread Ulrich Eckhardt
On Wednesday 24 September 2008, Neal Norwitz wrote: > In general, we try to ensure that there is an active maintainer, > preferably more than one. As long as it doesn't make the code that > much harder to maintain, it is desirable to support more platforms. Actually, looking at the sources, there

Re: [Python-Dev] Status of MS Windows CE port

2008-09-26 Thread Ulrich Eckhardt
On Thursday 25 September 2008, Martin v. Löwis wrote: > > 1. TCHAR is always WCHAR > > Python shouldn't be using TCHAR at all; that getpathp uses it is > misguided (IMO). It already does, see below... > > The first point is interesting to the desktop win32 variants because > > everything since NT

Re: [Python-Dev] Status of MS Windows CE port

2008-09-29 Thread Ulrich Eckhardt
On Friday 26 September 2008, Martin v. Löwis wrote: > >> Please don't. Whether or not _UNICODE is defined should have no effect. > > > > Well, currently it does make a difference. Simple example: CreateFile(). > > It's not so simple: Python doesn't actually call CreateFile, AFAICT > (well, it does,

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

2008-09-29 Thread Ulrich Eckhardt
On Sunday 28 September 2008, Gregory P. Smith wrote: > "broken" systems will always exist. Code to deal with them must be > possible to write in python 3.0. > > since any given path (not just fs) can have its own encoding it makes > the most sense to me to let the OS deal with the errors and not t

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

2008-09-29 Thread Ulrich Eckhardt
On Monday 29 September 2008, M.-A. Lemburg wrote: > On 2008-09-29 12:50, Ulrich Eckhardt wrote: > > 1. For POSIX platforms (using a byte string for the path): > > Here, the first approach is to convert the path to Unicode, according to > > the locale's CTYPE category. H

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

2008-09-29 Thread Ulrich Eckhardt
On Monday 29 September 2008, [EMAIL PROTECTED] wrote: > Also, what about MacOS X? AFAIK, OS X guarantees UTF-8 for filesystem encodings. So the OS also provides Unicode filenames and how it deals with broken or legacy media is left up to the OS. Uli -- Sator Laser GmbH Geschäftsführer: Thors

[Python-Dev] Broken link to NASM download location

2008-09-29 Thread Ulrich Eckhardt
Hi! In trunk/PCbuild/readme.txt it says NASM is available from kernel.org. The project has moved to Sourceforge though, please replace the link with http://nasm.sf.net Thanks! Uli -- Sator Laser GmbH Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932 ***

Re: [Python-Dev] Status of MS Windows CE port

2008-09-30 Thread Ulrich Eckhardt
On Tuesday 30 September 2008, Martin v. Löwis wrote: > Ulrich Eckhardt wrote: > >>> Well, currently it does make a difference. Simple example: > >>> CreateFile(). > >> > >> It's not so simple: Python doesn't actually call CreateFile > >

[Python-Dev] when is path==NULL?

2008-09-30 Thread Ulrich Eckhardt
Hi! I'm looking at trunk/Python/sysmodule.c, function PySys_SetArgv(). In that function, there is code like this: PyObject* path = PySys_GetObject("path"); ... if (path != NULL) { ... } My intuition says that if path==NULL, something is very wrong. At least I would expect to get 'N

Re: [Python-Dev] [Python-3000] New proposition for Python3 bytes filename issue

2008-10-01 Thread Ulrich Eckhardt
On Tuesday 30 September 2008, M.-A. Lemburg wrote: > On 2008-09-30 08:00, Martin v. Löwis wrote: > >> Change the default file system encoding to store bytes in Unicode is > >> like introducing a new Python type: . > > > > Exactly. Seems like the best solution to me, despite your polemics. > > Not a

[Python-Dev] Subversion access down?

2008-10-09 Thread Ulrich Eckhardt
Hi! Is it only me or does it fail for other people, too? I'm getting | Server sent unexpected return value (503 Service | Unavailable) in response to OPTIONS request | for 'http://svn.python.org/projects/python/trunk' Uli -- Sator Laser GmbH Geschäftsführer: Thorsten Föcking, Amtsgericht H

Re: [Python-Dev] My patches

2008-10-30 Thread Ulrich Eckhardt
On Thursday 30 October 2008, Victor Stinner wrote: > > One of the reasons why I'm very keen on us moving to a distributed > > version control system is to help break the logjam on core developers. > > Yeah, exactly :-) Does anyone already maintain a distributed tree? > Mercurial, GIT, anything else

Re: [Python-Dev] Python-3.0, unicode, and os.environ

2008-12-05 Thread Ulrich Eckhardt
On Friday 05 December 2008, [EMAIL PROTECTED] wrote: > Filenames and environment variables would all need to be encoded or > decoded according to this magic encoding. Those, and commandline arguments, too. Uli -- Sator Laser GmbH Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932

Re: [Python-Dev] Python-3.0, unicode, and os.environ

2008-12-05 Thread Ulrich Eckhardt
On Friday 05 December 2008, Adam Olsen wrote: > Many of the windows APIs use UTF-16 without validating it. They'll > pass through invalid strings until they hit something that does > validate, at which point it'll blow up. > > I suspect that it doesn't happen very often in practice, as having > on

Re: [Python-Dev] Python-3.0, unicode, and os.environ

2008-12-05 Thread Ulrich Eckhardt
On Friday 05 December 2008, Guido van Rossum wrote: > At the risk of bringing up something that was already rejected, let me > propose something that follows the path taken in 3.0 for filenames, > rather than doubling back: > > For os.environ, os.getenv() and os.putenv(), I think a similar > approa

Re: [Python-Dev] Python-3.0, unicode, and os.environ

2008-12-08 Thread Ulrich Eckhardt
On Friday 05 December 2008, James Y Knight wrote: > On Dec 5, 2008, at 5:27 AM, Ulrich Eckhardt wrote: > > Using the byte variant is equally fubar, because e.g. on MS Windows > > it is not supported, except through a very lossy roundtrip through > > the locale'

Re: [Python-Dev] Python-3.0, unicode, and os.environ

2008-12-08 Thread Ulrich Eckhardt
On Sunday 07 December 2008, Guido van Rossum wrote: > My problem with raising exceptions *by default* when an undecodable > name exists is that it may render an app completely useless in a > situation where the developer is no longer around. This happened all > the time with the 2.x Unicode API, wh

Re: [Python-Dev] Python-3.0, unicode, and os.environ

2008-12-09 Thread Ulrich Eckhardt
On Monday 08 December 2008, Adam Olsen wrote: > At this point someone suggests we have a type that can store an > arbitrary mix of unicode and bytes, so the undecodable portions stay > in their original form. :P Well, not an arbitrary mix, but a type that just stores whatever comes from the syste

Re: [Python-Dev] Python-3.0, unicode, and os.environ

2008-12-10 Thread Ulrich Eckhardt
On Tuesday 09 December 2008, Adam Olsen wrote: > On Tue, Dec 9, 2008 at 11:31 AM, Ulrich Eckhardt > > <[EMAIL PROTECTED]> wrote: > > On Monday 08 December 2008, Adam Olsen wrote: > >> At this point someone suggests we have a type that can store an > >> arb

Re: [Python-Dev] Python-3.0, unicode, and os.environ

2008-12-11 Thread Ulrich Eckhardt
On Wednesday 10 December 2008, Adam Olsen wrote: > On Wed, Dec 10, 2008 at 3:39 AM, Ulrich Eckhardt > > <[EMAIL PROTECTED]> wrote: > > On Tuesday 09 December 2008, Adam Olsen wrote: > >> The only thing separating this from a bikeshed discussion is that a >

Re: [Python-Dev] Python-3.0, unicode, and os.environ

2008-12-11 Thread Ulrich Eckhardt
On Thursday 11 December 2008, Steve Holden wrote: > Ulrich Eckhardt wrote: > > What I'd just like some feedback on is the approach to return a distinct > > type (neither a byte string nor a Unicode string) from readdir(). In > > order to use this, a programmer will hav

Re: [Python-Dev] Python-3.0, unicode, and os.environ

2008-12-12 Thread Ulrich Eckhardt
On Thursday 11 December 2008, Steve Holden wrote: > Ulrich Eckhardt wrote: > > If readdir() returned Unicode text, people would start taking that for > > granted. If it returned bytes, just the same. Returning a completely > > unrelated type will give them enough hint that for

Re: [Python-Dev] Python-3.0, unicode, and os.environ

2008-12-12 Thread Ulrich Eckhardt
On Thursday 11 December 2008, Adam Olsen wrote: > The simplest solution there is to have windows bytes APIs that return > raw UTF-16 bytes (note that windows does NOT guaranteed to be valid > unicode, despite being much more likely than on linux). Actually, I'm not aware of this case. I only know

Re: [Python-Dev] Python-3.0, unicode, and os.environ

2008-12-12 Thread Ulrich Eckhardt
On Friday 12 December 2008, Stephen J. Turnbull wrote: > I gather that the BFDL's line on this thread of discussion is that > forcing programmers to think about encodings every time they call out > to the OS is unacceptable Exactly that is not necessary. for n in os.readdir('.'): f = open

Re: [Python-Dev] Python-3.0, unicode, and os.environ

2008-12-15 Thread Ulrich Eckhardt
On Friday 12 December 2008, Adam Olsen wrote: > Only pages like this, which indicate the underlying API is an array of > WCHAR: > > http://blogs.msdn.com/michkap/archive/2005/05/11/416552.aspx Hmm, true. So even there, the encoding isn't known... > char * is just fine. You need only pass a lengt

[Python-Dev] WinCE port (issues #4075 #4051)

2008-12-30 Thread Ulrich Eckhardt
Hi! I'm currently working again on the CE port, and since 2.6 and 3.0 are now out of the door, could you apply the patches in #4075 & #4051? Both patches are fairly isolated and easy to review and I'm pretty sure they won't cause any inconveniences. Note: this is far from everything that is ne

[Python-Dev] #ifdef __cplusplus?

2009-01-01 Thread Ulrich Eckhardt
Hi! There are lots of files that are framed with an extern "C" stanza when compiled under C++. Now, I appreciate that header files are made suitable for use with C++ with that, but WTF are those doing in .c files??? puzzled greetings Uli ___ Python-D

Re: [Python-Dev] #ifdef __cplusplus?

2009-01-02 Thread Ulrich Eckhardt
On Friday 02 January 2009 06:17:24 Alexander Belopolsky wrote: > Since that issue is closed, I have created > http://bugs.python.org/issue4805 with a patch that restores C++ > compilability of the core and a few standard modules. Looking at the patch, I see three main changes there: 1. Remove the

[Python-Dev] ParseTuple question

2009-01-02 Thread Ulrich Eckhardt
Hi! I'm looking at NullImporter_init in import.c and especially at the call to PyArg_ParseTuple there. What I'm wondering is what that call will do when I call the function with a Unicode object. Will it convert the Unicode to a char string first, will it return the Unicode object in a certain

[Python-Dev] PyOS_GetLastModificationTime

2009-01-02 Thread Ulrich Eckhardt
Hi! The function PyOS_GetLastModificationTime() is documented in sys.rst as taking a "char*". However, in reality, it takes a "char*" and a "FILE*". Actually, it should take a "char const*", as it doesn't and shouldn't modify the path. Further, the normal version doesn't use the path at all, th

Re: [Python-Dev] PyOS_GetLastModificationTime

2009-01-02 Thread Ulrich Eckhardt
On Friday 02 January 2009 22:30:39 Ulrich Eckhardt wrote: > The function PyOS_GetLastModificationTime() is documented in sys.rst as > taking a "char*". However, in reality, it takes a "char*" and a "FILE*". > Actually, it should take a "char const*&quo

Re: [Python-Dev] PyOS_GetLastModificationTime

2009-01-03 Thread Ulrich Eckhardt
On Friday 02 January 2009 23:18:04 Martin v. Löwis wrote: > Correct me if I'm wrong: it seems that the function isn't called > anymore. So I propose to just remove it (and the file it lives > in). Filed as issue #4817, including patch. Uli ___ Python-De

Re: [Python-Dev] I would like an svn account

2009-01-03 Thread Ulrich Eckhardt
On Saturday 03 January 2009 16:52:56 Victor Stinner wrote: > > A little offtopic: it seems to me it is a flaw of svn, that it > > encourages the model of two classes of developers, those with a commit > > access (first class) and those without it (second class). > > Yes, that's the problem. Is it n

Re: [Python-Dev] I would like an svn account

2009-01-03 Thread Ulrich Eckhardt
On Saturday 03 January 2009 17:21:16 Antoine Pitrou wrote: > Ulrich Eckhardt knuut.de> writes: > > saying "please merge r1234 from > > foo into trunk" is much easier than downloading and applying a patch, > > which doesn't even cover all possible change

Re: [Python-Dev] I would like an svn account

2009-01-03 Thread Ulrich Eckhardt
On Saturday 03 January 2009 17:36:04 Martin v. Löwis wrote: > > As far as your goal is concerned, couldn't you live with a branch where > > you develop the feature? > > That still doesn't help the change getting merged into the trunk. > Whether you store it in a patch file, in a DVCS, or in the ver

Re: [Python-Dev] ParseTuple question

2009-01-04 Thread Ulrich Eckhardt
[sorry, dropped one pair of mails off the list, hence also the overquoting] On Sunday 04 January 2009 01:07:08 Mark Hammond wrote: > > > On 'normal' windows you generally would need to use > > > WideCharToMultiByte() to get a 'char *' version of your wchar > > > string but I expect you already kno

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

2009-01-05 Thread Ulrich Eckhardt
On Monday 05 January 2009 23:48:13 Malte Helmert wrote: > For people who are not core developers but would still like to > contribute, the Bug Days are quite exciting events. It would be great if > they could keep going. As a not core developer, I would like to know what exactly that means. ;) U

[Python-Dev] a few strdup() questions...

2009-01-07 Thread Ulrich Eckhardt
Greetings! MS Windows CE doesn't provide strdup(), so where should I put it? I guess I should just compile in Python/strdup.c, right? However, where should I declare it? My approach would be to declare it in PC/pyconfig.h. I see that RISCOS also seems to lack that function, which is why it is

Re: [Python-Dev] a few strdup() questions...

2009-01-08 Thread Ulrich Eckhardt
On Wednesday 07 January 2009 16:30:23 Daniel Stutzbach wrote: > On Wed, Jan 7, 2009 at 5:30 AM, Ulrich Eckhardt wrote: > > MS Windows CE doesn't provide strdup(), so where should I put it? I guess > > I should just compile in Python/strdup.c, right? > > I'm not

Re: [Python-Dev] Py_END_ALLOW_THREADS and GetLastError()

2009-01-10 Thread Ulrich Eckhardt
On Saturday 10 January 2009 12:29:47 Kristján Valur Jónsson wrote: > Currently on Windows, Py_END_ALLOW_THREADS can have the side effect of > resetting the windows error code returned by GetLastError(). There is a > number of cases, particularly in posixmodule, with a pattern like: > Py_BEGIN_ALLOW

Re: [Python-Dev] Py_END_ALLOW_THREADS and GetLastError()

2009-01-10 Thread Ulrich Eckhardt
On Saturday 10 January 2009 15:11:16 Martin v. Löwis wrote: > > Well, that's what you get for using globals > > Please do take a look at the issue at hand before pointing fingers. I'm really sorry if this sounded like I was accusing someone, that was not my intention. Uli

[Python-Dev] How should I handle unsupported features?

2009-01-11 Thread Ulrich Eckhardt
Hi! Porting to MS Windows CE, I find that e.g. signals or environment vars are not supported. How should I handle that? In particular, I'm talking about PyOS_getsig() and PyOS_setsig(). Should I just #ifdef them out completely or should I implement them by setting an error? Which error should I

[Python-Dev] Update on MS Windows CE port

2009-01-23 Thread Ulrich Eckhardt
Hi! Just a short update on my porting issues. I tried various things in the holidays/vacation, filed several bug reports, got a few patches applied and I think the thing is taking shape now. However, I couldn't work on it for the past two weeks since I'm just too swamped at work here. I haven't

Re: [Python-Dev] microsoft dlls apparently don't support data. implications: PyAPI functions required to access data across modules.

2009-01-26 Thread Ulrich Eckhardt
On Sunday 25 January 2009, Luke Kenneth Casson Leighton wrote: > matthieu, thank you for responding. from > http://en.wikipedia.org/wiki/Dynamic-link_library: > > "Third, dynamic linking is inherently the wrong model for paged memory > managed systems. Such systems work best with the idea that cod

[Python-Dev] FormatError() in callproc.c under win32

2009-01-26 Thread Ulrich Eckhardt
Hi! In callproc.c from trunk is a function called SetException(), which calls FormatError() only to discard the contents. Can anyone enlighten me to the reasons thereof? Is it just to check if the errorcode is registered in the stringtables? The reason I ask is the CE port. The FormatMessage A

Re: [Python-Dev] FormatError() in callproc.c under win32

2009-01-27 Thread Ulrich Eckhardt
On Monday 26 January 2009, Thomas Heller wrote: > Ulrich Eckhardt schrieb: > > In callproc.c from trunk is a function called SetException(), which calls [...] > > My third approach would be to filter out the special error codes first > > and delegate all others to PyErr_Set

Re: [Python-Dev] FormatError() in callproc.c under win32

2009-01-27 Thread Ulrich Eckhardt
On Monday 26 January 2009, Martin v. Löwis wrote: > > In callproc.c from trunk is a function called SetException(), which calls > > FormatError() only to discard the contents. Can anyone enlighten me to > > the reasons thereof? > > Interestingly enough, the code used to say > >PyErr_SetString(P

Re: [Python-Dev] Python as a Metro-style App

2012-01-16 Thread Ulrich Eckhardt
Am 07.01.2012 18:57, schrieb "Martin v. Löwis": I just tried porting Python as a Metro (Windows 8) App, and failed. Metro Apps use a variant of the Windows API called WinRT that still allows to write native applications in C++, but restricts various APIs to a subset of the full Win32 functionali

Re: [Python-Dev] Improve error message "UnboundLocalError: local variable referenced before assignment"

2012-11-07 Thread Ulrich Eckhardt
Am 31.10.2012 23:15, schrieb Steven D'Aprano: On 01/11/12 06:57, anatoly techtonik wrote: [...] UnboundLocalError: local variable 'FONT_NAMES' referenced before assignment [...] I wonder if this message can be improved with a pointer to the concept on when global variables become local? If y

Re: [Python-Dev] performance of {} versus dict()

2012-11-14 Thread Ulrich Eckhardt
Am 14.11.2012 10:12, schrieb Chris Withers: Can someone with Python 3 handy compare there too? C:\Python27\python -m timeit -n 100 -r 5 -v "dict(a=1, b=2, c=3, d=4, e=5, f=6, g=7)" raw times: 0.918 0.924 0.922 0.928 0.926 100 loops, best of 5: 0.918 usec per loop C:\Python27\python

Re: [Python-Dev] Proposing "Argument Clinic", a new way of specifying arguments to builtins for CPython

2012-12-04 Thread Ulrich Eckhardt
Am 03.12.2012 23:29, schrieb Larry Hastings: [...autogen some code from special comment strings...] /*[clinic] dbm.open -> mapping basename=dbmopen const char *filename; The filename to open. const char *flags="r"; How to open the file. "r" for read