Re: True == 1 weirdness

2015-09-23 Thread Michael Schwarz
On 2015-09-19, at 09:19, Gregory Ewing wrote: > Random832 wrote: >> I'm disputing that chained comparisons are used for the particular >> combinations that I am actually arguing should not be used in python. >> Such as a < b > c or a != b != c [whereas a may or may not be equal to >> c] > > I c

Byteorder of audioop functions

2013-11-18 Thread Michael Schwarz
Hi Is the byteorder (or endianness) of the functions in the audioop module somewhere specified or does anyone know how it behaves on different systems? On my little-endian system it matches the system's endianness: >>> import sys, audioop >>> sys.byteorder 'little' >>> audioop.lin2lin(b'\xff',

Re: Running code from source that includes extension modules

2013-10-02 Thread Michael Schwarz
On 2013-W40-3, at 21:15, Stefan Behnel wrote: > Michael Schwarz, 02.10.2013 17:38: >> I've just started looking into distutils because I need to write an >> extension module in C (for performance reasons) and distutils seems to be >> the most straight-forward wa

Re: Running code from source that includes extension modules

2013-10-02 Thread Michael Schwarz
On 2013-W40-3, at 19:15, "Gisle Vanem" wrote: > "Michael Schwarz" wrote: > >> So how do I run my code so it will find the built extension module? Do I >> pass the output directory on the command line manually or is there some >> other solution? I

Running code from source that includes extension modules

2013-10-02 Thread Michael Schwarz
Hi I've just started looking into distutils because I need to write an extension module in C (for performance reasons) and distutils seems to be the most straight-forward way. I've had success building a C file into a Python extension module using "python setup.py build" but I am wondering what t

Re: Is %z broken for return values of time.gmtime()?

2013-09-16 Thread Michael Schwarz
On 2013-W38-1, at 19:56, random...@fastmail.us wrote: > On Mon, Sep 16, 2013, at 9:15, Michael Schwarz wrote: >> According to the documentation of time.gmtime(), it returns a struct_time >> in UTC, but %z is replaced by +0100, which is the UTC offset of my OS’s >> time zone

Is %z broken for return values of time.gmtime()?

2013-09-16 Thread Michael Schwarz
I’m wondering whether this is expected: Python 3.3.2 (default, May 21 2013, 11:50:47) [GCC 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.66))] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import time >>> time.strftime("%F %T %z", time.gmtime(40

Re: How to improve the usability of nested packages

2012-11-03 Thread Michael Schwarz
Hi Stefan On 2012-W44-5, at 19:23, Stefan H. Holek wrote: > That said, there are ways to avoid import cycles. One is to very carefully > craft your modules so they do not have to import from each other. Another is > to not have imports at the module level, but move them into the functions > wh

Re: How to improve the usability of nested packages

2012-11-03 Thread Michael Schwarz
Hi Terry On 2012-W44-5, at 18:56, Terry Reedy wrote: >> or would you maybe structure the library entirely different? > > Based on my limited experience with subpackages* plus reports on this list > about problems, such as yours, I have concluded that subpackages are an > attractive nuisance th