On Thu, Apr 16, 2015 at 1:14 AM, Alexander Belopolsky <
alexander.belopol...@gmail.com> wrote:
>
> On Wed, Apr 15, 2015 at 4:46 PM, Akira Li <4kir4...@gmail.com> wrote:
>
>> > Look what happened on July 1, 1990. At 2 AM, the clocks in Ukraine were
>> > mo
Isaac Schwabacher writes:
> On 15-04-15, Akira Li <4kir4...@gmail.com> wrote:
>> Isaac Schwabacher writes:
>> > ...
>> >
>> > I know that you can do datetime.now(tz), and you can do datetime(2013,
>> > 11, 3, 1, 30, tzinfo=zoneinfo('Americ
Alexander Belopolsky writes:
> ...
> For most world locations past discontinuities are fairly well documented
> for at least a century and future changes are published with at least 6
> months lead time.
It is important to note that the different versions of the tz database
may lead to different
Alexander Belopolsky writes:
> Sorry for a truncated message. Please scroll past the quoted portion.
>
> On Thu, Apr 9, 2015 at 10:21 PM, Alexander Belopolsky <
> alexander.belopol...@gmail.com> wrote:
>
>>
>> On Thu, Apr 9, 2015 at 4:51 PM, Isaac Schwabacher
>> wrote:
>>
>>> > > > Well, you ar
Isaac Schwabacher writes:
> ...
>
> I know that you can do datetime.now(tz), and you can do datetime(2013,
> 11, 3, 1, 30, tzinfo=zoneinfo('America/Chicago')), but not being able
> to add a time zone to an existing naive datetime is painful (and
> strptime doesn't even let you pass in a time zone)
Lennart Regebro writes:
> OK, so I realized another thing today, and that is that arithmetic
> doesn't necessarily round trip.
>
> For example, 2002-10-27 01:00 US/Eastern comes both in DST and STD.
>
> But 2002-10-27 01:00 US/Eastern STD minus two days is 2002-10-25 01:00
> US/Eastern DST
"two
Alexander Belopolsky writes:
> On Wed, Apr 8, 2015 at 3:57 PM, Isaac Schwabacher
> wrote:
>>
>> On 15-04-08, Alexander Belopolsky wrote:
>> > With datetime, we also have a problem that POSIX APIs don't have to
> deal with: local time
>> > arithmetics. What is t + timedelta(1) when t falls on the
Larry Hastings writes:
> On 11/29/2014 04:37 PM, Donald Stufft wrote:
>> On Nov 29, 2014, at 7:15 PM, Alex Gaynor wrote:
>>> Despite being a regular hg
>>> user for years, I have no idea how to create a local-only branch, or a
>>> branch
>>> which is pushed to a remote (to use the git term).
>>
Steven D'Aprano writes:
> On Wed, Sep 17, 2014 at 11:14:15AM +1000, Chris Angelico wrote:
>> On Wed, Sep 17, 2014 at 5:29 AM, R. David Murray
>> wrote:
>
>> > Basically, we are pretending that the each smuggled
>> > byte is single character for string parsing purposes...but they don't
>> > matc
Nick Coghlan writes:
> On 12 August 2014 22:15, Steven D'Aprano wrote:
>> Compare the natural way of writing this:
>>
>> with open("spam") as spam, open("eggs", "w") as eggs, frobulate("cheese") as
>> cheese:
>> # do stuff with spam, eggs, cheese
>>
>> versus the dynamic way:
>>
>> with Exi
Armin Rigo writes:
> On 10 August 2014 08:11, Larry Hastings wrote:
>>> A small tip from my bzr days - cd into the directory before scanning it
>>
>> I doubt that's permissible for a library function like os.scandir().
>
> Indeed, chdir() is notably not compatible with multithreading. There
> w
"Schmitt Uwe (ID SIS)" writes:
> I discovered a problem using cPickle.loads from CPython 2.7.6.
>
> The last line in the following code raises an infinite recursion
>
> class T(object):
>
> def __init__(self):
> self.item = list()
>
> def __getattr__(self, name):
Shiz writes:
> The most obvious change would be to subprocess.Popen(). The reason a
> generic approach there won't work is also the reason I expect more
> changes might be needed: the Android file system doesn't abide by any
> POSIX file system standards. Its shell isn't located at /bin/sh, but a
Guido van Rossum writes:
> Well, it really does look like checking for the presence of those ANDROID_*
> environment variables it the best way to recognize the Android platform.
> Anyone can do that without waiting for a ruling on whether Android is Linux
> or not (which would be necessary becaus
Shiz writes:
> Hi folks,
>
> I’m working on porting CPython to the Android platform, and while
> making decent progress, I’m currently stuck at a higher-level issue
> than adding #ifdefs for __ANDROID__ to C extension modules.
>
> The idea is, not only CPython extension modules have some assumpti
Ben Hoyt writes:
>> Note: listdir() accepts an integer path (an open file descriptor that
>> refers to a directory) that is passed to fdopendir() on POSIX [4] i.e.,
>> *you can't use scandir() to replace listdir() in this case* (as I've
>> already mentioned in [1]). See the corresponding tests fr
Ben Hoyt writes:
> I think if I were doing this from scratch I'd reimplement listdir() in
> Python as "return [e.name for e in scandir(path)]".
...
> So my basic plan is to have an internal helper function in
> posixmodule.c that either yields DirEntry objects or strings. And then
> listdir() wou
Nick Coghlan writes:
> On 13 Jul 2014 20:54, "Tim Delaney" wrote:
>>
>> On 14 July 2014 10:33, Ben Hoyt wrote:
>>>
>>>
>>>
>>> If we go with Victor's link-following .is_dir() and .is_file(), then
>>> we probably need to add his suggestion of a follow_symlinks=False
>>> parameter (defaults to Tr
Nick Coghlan writes:
...
> definition of floats and the definition of container invariants like
> "assert x in [x]")
>
> The current approach means that the lack of reflexivity of NaN's stays
> confined to floats and similar types - it doesn't leak out and infect
> the behaviour of the container t
Ben Hoyt writes:
...
> ``scandir()`` yields a ``DirEntry`` object for each file and directory
> in ``path``. Just like ``listdir``, the ``'.'`` and ``'..'``
> pseudo-directories are skipped, and the entries are yielded in
> system-dependent order. Each ``DirEntry`` object has the following
> attri
Ben Hoyt writes:
> Thanks, Victor.
>
> I don't have any experience with dir_fd handling, so unfortunately
> can't really comment here.
>
> What advantages does it bring? I notice that even os.listdir() on
> Python 3.4 doesn't have anything related to file descriptors, so I'd
> be in favour of not
Chris Angelico writes:
> On Sat, Jun 28, 2014 at 11:05 PM, Akira Li <4kir4...@gmail.com> wrote:
>> Have you considered adding support for paths relative to directory
>> descriptors [1] via keyword only dir_fd=None parameter if it may lead to
>> more efficient implem
Ben Hoyt writes:
> Hi Python dev folks,
>
> I've written a PEP proposing a specific os.scandir() API for a
> directory iterator that returns the stat-like info from the OS, *the
> main advantage of which is to speed up os.walk() and similar
> operations between 4-20x, depending on your OS and fil
Florian Bruhin writes:
> * Nikolaus Rath [2014-06-12 19:11:07 -0700]:
>> "R. David Murray" writes:
>> > Also notice that using a list with shell=True is using the API
>> > incorrectly. It wouldn't even work on Linux, so that torpedoes
>> > the cross-platform concern already :)
>> >
>> > This k
Victor Stinner writes:
> If you need a well defined environement, run your test in a subprocess.
> Depending on the random function, your test may be run with more threads.
> On BSD, it changes for example which thread receives a signal. Importing
> the tkinter module creates a "hidden" C thread
25 matches
Mail list logo