Re: [Python-Dev] Issue 2736: datetimes and Unix timestamps

2012-06-05 Thread Alexander Belopolsky
On Tue, Jun 5, 2012 at 5:48 PM, Terry Reedy wrote: > 3.3 enhancement or backported bugfix? Please move this discussion to the tracker: http://bugs.python.org/issue15006 ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/lis

Re: [Python-Dev] TZ-aware local time

2012-06-05 Thread Alexander Belopolsky
On Tue, Jun 5, 2012 at 6:07 PM, Guido van Rossum wrote: >> I've also been arguing against "local time" tzinfo > > Why? I don't see your argumentation against such a tzinfo in the bug See http://bugs.python.org/issue9063 . The problem is again the DST ambiguity. One day a year, datetime(y, m, d,

Re: [Python-Dev] TZ-aware local time

2012-06-05 Thread Alexander Belopolsky
On Tue, Jun 5, 2012 at 6:49 PM, Guido van Rossum wrote: >> The problem is again the DST ambiguity.  One day a year, datetime(y, >> m, d, 1, 30, tzinfo=Local) represents two different times and another >> day it represents no valid time.  Many applications can ignore this >> problem but stdlib shou

Re: [Python-Dev] TZ-aware local time

2012-06-05 Thread Alexander Belopolsky
On Tue, Jun 5, 2012 at 8:18 PM, Barry Warsaw wrote: >> I think stdlib should allow me to write >>a robust application that knows that some naive datetime objects >>correspond to two points in time and some correspond to none. > > Really?  Why would naive datetimes know that?  I would expect that a

Re: [Python-Dev] TZ-aware local time

2012-06-05 Thread Alexander Belopolsky
On Tue, Jun 5, 2012 at 9:16 PM, Nick Coghlan wrote: > ... Local time should only be used for displaying > dates and times to humans (since we care about little things like > local sunrise and sunset, local business hours, etc) and for > inter-system coordination where such details are relevant. >

Re: [Python-Dev] TZ-aware local time

2012-06-05 Thread Alexander Belopolsky
On Tue, Jun 5, 2012 at 7:11 PM, Greg Ewing wrote: > What would be so bad about giving datetime objects > a DST flag? Apps that don't care could ignore it and > get results no worse than the status quo. This would neatly solve the round-trip problem, but will open a different can of worms: what ha

Re: [Python-Dev] TZ-aware local time

2012-06-08 Thread Alexander Belopolsky
On Tue, Jun 5, 2012 at 6:07 PM, Guido van Rossum wrote: >> See http://bugs.python.org/issue9527 . > With datetime.timestamp() method committed, I would like to get back to this issue. In some sense, an inverse of datetime.timestamp() is missing from the datetime module. Given a POSIX timestam

Re: [Python-Dev] TZ-aware local time

2012-06-11 Thread Alexander Belopolsky
On Fri, Jun 8, 2012 at 11:06 PM, Guido van Rossum wrote: > On Fri, Jun 8, 2012 at 2:08 PM, Alexander Belopolsky > wrote: .. >>>>> t = mktime((2010, 11, 7, 1, 0, 0, -1, -1, 0)) >>>>> for i in range(5): >> ...     print(strftime("%T%z", localt

Re: [Python-Dev] TZ-aware local time

2012-06-11 Thread Alexander Belopolsky
On Mon, Jun 11, 2012 at 1:01 PM, Guido van Rossum wrote: .. > Maybe the problem here is the *input*? It should be a POSIX timestamp, > not a datetime object. > No. "Seconds since epoch" or "POSIX" timestamp is a foreign data type to the datetime module. An aware datetime object with tzinfo=time

Re: [Python-Dev] TZ-aware local time

2012-06-13 Thread Alexander Belopolsky
On Tue, Jun 12, 2012 at 1:14 AM, Ben Finney wrote: >> To the contrary, without the POSIX timestamp model to define the >> equivalency between the same point in time expressed using different >> timezones, sane comparisons and arithmetic on timestamps would be >> impossible. > > Why is the POSIX ti

Re: [Python-Dev] 3.3 str timings

2012-08-21 Thread Alexander Belopolsky
On Tue, Aug 21, 2012 at 1:56 PM, Xavier Morel wrote: > As a side-note, every time I use timeit programmatically, it annoys me that > this behavior is not available and has to be implemented manually. You are not alone: http://bugs.python.org/issue6422 ___

[Python-Dev] Py_buffer.obj documentation

2012-08-29 Thread Alexander Belopolsky
I am trying to reconcile this section in 3.3 documentation: """ void *obj A new reference to the exporting object. The reference is owned by the consumer and automatically decremented and set to NULL by PyBuffer_Release(). The field is the equivalent of the return value of any standard C-API func

Re: [Python-Dev] cpython (3.2): Issue #15881: Fixed atexit hook in multiprocessing.

2012-09-09 Thread Alexander Belopolsky
This change was in the original patch and I did not notice that it went into wrong file. Will fix it now. On Sun, Sep 9, 2012 at 2:02 PM, Antoine Pitrou wrote: > You really want to credit code contributions in Misc/ACKS, not > Doc/ACKS.txt. Furthermore, the entries should probably be inserted i

Re: [Python-Dev] PEP 431 Time zone support improvements - Update

2013-01-07 Thread Alexander Belopolsky
On Mon, Jan 7, 2013 at 1:06 PM, Brett Cannon wrote: .. > +1 for putting this under datetime; "Namespaces are one honking great > idea". People looking for date stuff is going to look in datetime or > time first so might as well put it there to begin with. +1 for the same reason. _

[Python-Dev] Re: Is msvcr71.dll re-redistributable?

2005-02-03 Thread Alexander Schremmer
r > with his application or not, even if he doesn't own MSVC? How about statically compiling the code? Then you do not need to distribute the runtime library. It should not make a big difference for the rather large file python24.dll Kind regards, Alexander __

[Python-Dev] Re: RELEASED Python 2.4.1, release candidate 1

2005-03-12 Thread Alexander Schremmer
On Sat, 12 Mar 2005 11:38:50 +0100, "Martin v. Löwis" wrote: > Somebody reported that it failed to update python24.dll in > an update installation; not sure why this would be. Because it was in use? Kind regards, Alexander ___ Python-

Re: [Python-Dev] http://www.python.org/dev/doc/devel still available

2006-02-17 Thread Alexander Schremmer
.e. they fallback to the documentation if that path does not exist otherwise. Kind regards, Alexander ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/o

Re: [Python-Dev] Dropping support for Win9x in 2.6

2006-02-24 Thread Alexander Schremmer
8. The last Windows release of that branch was Windows ME, in September 2000, i.e. you have to wait till 2010 in order to be ten years after the last legacy OS release. Kind regards, Alexander ___ Python-Dev mailing list Python-Dev@python.org http://mai

Re: [Python-Dev] Fwd: Translating docs

2006-02-26 Thread Alexander Schremmer
On Sun, 26 Feb 2006 08:50:57 +0100, Georg Brandl wrote: > Martin: There aren't any German docs, are there? There is e.g. http://starship.python.net/~gherman/publications/tut-de/ Kind regards, Alexander ___ Python-Dev mailing list Py

Re: [Python-Dev] Threading idea -- exposing a global thread lock

2006-03-14 Thread Alexander Schremmer
plements lock()/unlock() with locked(res): do_something(res) Directly exposing the GIL (or some related system) for such matters does not seem to be a good reason for a novice to let him stop all threads. Kind regards, Alexander ___ Python-Dev m

Re: [Python-Dev] About "Coverity Study Ranks LAMP Code Quality"

2006-03-14 Thread Alexander Schremmer
ased on reading the SVN check-ins ... Kind regards, Alexander ___ 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] The "i" string-prefix: I18n'ed strings

2006-04-07 Thread Alexander Schremmer
t about simply writing _ = lambda x:x instead of N_ ...? By doing that, you just need to care about one function (of course _ doesn't translate in that case and you might need to del _ afterwards). Kind regards, Alexander ___ Python-Dev mailing list

Re: [Python-Dev] The "i" string-prefix: I18n'ed strings

2006-04-07 Thread Alexander Schremmer
On Fri, 7 Apr 2006 10:07:26 -0400, Martin Blais wrote: > There are cases where you need N_() after initialization, so you need > both, really. See the link I sent to Alex earlier (to the GNU manual > example). On the page you were referring to, I cannot find a particular use case that does not w

[Python-Dev] bug in PEP 318

2006-05-30 Thread Alexander Bernauer
erhaps I misunderstood something completly. In this case, please excuse me and ignore my mail. The welcome message to this lists asked for introducing myself. Well, there is nothing special to say about me concerning python. Let's say, I'm just a fan. cu -- Alexander Bernauer ___

Re: [Python-Dev] Source control tools

2006-06-13 Thread Alexander Schremmer
g different DVCS for the FreeBSD ports tree (one of the largest CVS repositories that exists ;-)): http://www.keltia.net/BSDCan/slides.pdf Kind regards, Alexander ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listin

Re: [Python-Dev] Source control tools

2006-06-15 Thread Alexander Schremmer
On Thu, 15 Jun 2006 19:00:09 +0200, Jan Claeys wrote: > Op di, 13-06-2006 te 10:27 +0200, schreef Alexander Schremmer: >> Bazaar-NG seems to reach limits already when working on >> it's own code/repository. > > Canonical uses bzr to develop launchpad.net, which is a

[Python-Dev] Keeping interned strings in a set

2006-06-15 Thread Alexander Belopolsky
As an exercise in using the new set C API, I've replaced the "interned" dictionary in stringobject.c with a set. Surprisingly, what I thought would be a simple exercise, took several hours to implement and debug. Two problems are worth mentioning: 1. I had to add a function to setobject.h to ret

Re: [Python-Dev] Keeping interned strings in a set

2006-06-15 Thread Alexander Belopolsky
This is very raw, but in the spirit of "release early and often", here it is: http://sourceforge.net/tracker/download.php? group_id=5470&atid=305470&file_id=181807&aid=1507011 On Jun 15, 2006, at 8:47 PM, Raymond Hettinger wrote: > > I would be curious to see your patch. > > > Raymond ___

Re: [Python-Dev] Keeping interned strings in a set

2006-06-15 Thread Alexander Belopolsky
On Jun 15, 2006, at 10:29 PM, Raymond Hettinger wrote: > > Nicely done. It is fine by me if this goes in so we save a little > space in the intern table. Thanks for the good word. I've reworked the code a little bit and fixed the comments. I don't have svn write access, so someone else

[Python-Dev] setobject code

2006-06-16 Thread Alexander Belopolsky
I would like to share a couple of observations that I made as I studied the latest setobject implementation. 1. Is there a reason not to have PySet_CheckExact, given that PyFrozenSet_CheckExact exists? Similarly, why PyAnySet_Check, but no PySet_Check or PyFrozenSet_Check? 2. Type of severa

[Python-Dev] Misleading error message from PyObject_GenericSetAttr

2006-06-18 Thread Alexander Belopolsky
When an extension type Foo defines tp_getattr, but leaves tp_setattr NULL, an attempt to set an attribute bar results in an AttributeError with the message "'Foo' object has no attribute 'bar'". This message is misleading because the object may have the attribute 'bar' as implemented in tp_getattr

Re: [Python-Dev] Misleading error message from PyObject_GenericSetAttr

2006-06-26 Thread Alexander Belopolsky
On 6/19/06, Guido van Rossum <[EMAIL PROTECTED]> wrote: > On 6/14/06, Alexander Belopolsky <[EMAIL PROTECTED]> wrote: > > ... It would be better to change the message > > to "'Foo' object has only read-only attributes (assign to .bar)" as in &g

[Python-Dev] Proposal to eliminate PySet_Fini

2006-06-27 Thread Alexander Belopolsky
Setobject code allocates several internal objects on the heap that are cleaned up by the PySet_Fini function. This is a fine design choice, but it often makes debugging applications with embedded python more difficult. I propose to eliminate the need for PySet_Fini as follows: 1. Make dummy and

Re: [Python-Dev] Proposal to eliminate PySet_Fini

2006-06-29 Thread Alexander Belopolsky
Fredrik Lundh pythonware.com> writes: > given that CPython has about a dozen Fini functions, what exactly is it > that makes PySet_Fini so problematic ? > I have not been bitten by the other _Fini yet. ;-) I was bitten by PySet_Fini when I tried to replace the "interned" dict with a set. Sin

Re: [Python-Dev] Proposal to eliminate PySet_Fini

2006-06-29 Thread Alexander Belopolsky
On 6/29/06, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: >... dict is more basic, set is just a special case of > dict for performance reasons. Also, dict is used to define and implement > the language itself, set is "just" a predefined type. > I guess it can be seen either way, just as a chicken a

Re: [Python-Dev] Proposal to eliminate PySet_Fini

2006-06-29 Thread Alexander Belopolsky
On 6/29/06, Josiah Carlson <[EMAIL PROTECTED]> wrote: > I disagree. You can get everything you need with a dict, and making > sets a part of the language (besides being a builtin type), would > necessarily add more overhead and maintenance to the language for little > gain. If you need set-like f

Re: [Python-Dev] Proposal to eliminate PySet_Fini

2006-06-30 Thread Alexander Belopolsky
Kristján V. Jónsson ccpgames.com> writes: > Can this not be resolved by carefully adjusting the order of finalization? Absolutely. This is exactly what I did in my "interned" patch and this is what prompted my proposal. > If code can be bootstrapped it can be strootbapped. Agree. However, the

[Python-Dev] For/while/if statements/comprehension/generator expressions unification

2005-09-19 Thread Alexander Myodov
d_handle_this_column(x) while(!timeout_pos_in_row()) for y in range (0, 480) if should_handle_this_row(y) while(!timeout_rows() ) --- Hope I didn't miss something important... -- With best regards, Alexander mailto:[EMAIL PROTECTED]

Re: [Python-Dev] For/while/if statements/comprehension/generator expressions unification

2005-09-19 Thread Alexander Myodov
Hello Josiah, JC> Alexander, JC> The essence of what you have proposed has been proposed (multiple times) before, JC> and I seem to remember it was shot down. To increase my understanding of Python-way, can you (or someone else) explain the reasons why such proposals were rejected?

[Python-Dev] Visibility scope for "for/while/if" statements

2005-09-22 Thread Alexander Myodov
r, e1 = [r for r in b1] # Now try to access the "r" variable from the loop! print "r1: %s" % r cut here -- With best regards, Alexander mailto:[EMAIL PROTECTED] ___

Re: [Python-Dev] Visibility scope for "for/while/if" statements

2005-09-22 Thread Alexander Myodov
borrowed from another language, but only partly - only in the area of ability to have "for" and "while" inside the single loop expression), so I though that the best people to estimate it should be the ones who potentially could implement this (provided they like it). For this conversa

Re: [Python-Dev] Visibility scope for "for/while/if" statements

2005-09-22 Thread Alexander Myodov
ot;for (int i = 0; i <= 5; i++);" perfectly. Along with another sample mentioned above . To this day, I relied upon gcc in terms of standards compatibility... JC> Tes your ideas on comp.lang.python first, when more than a handful of JC> people agree with you, come back. Ok. Next ti

Re: [Python-Dev] str.dedent

2005-11-13 Thread Alexander Kozlovsky
s. That is why we don't > have str.md5(), str.crc32(), str.ziplib(), etc. I think, dedenting must be classified as "generic string manipulations". The need in string dedenting results from meaningful indentation and widespread use of text editors with folding support. Multiline s

[Python-Dev] Draft proposal: Implicit self in Python 3.0

2006-01-05 Thread Alexander Kozlovsky
t;overloaded method!" ... return super(MyList, self).__getitem__(key) ... def __setitem__(key, value): ... print "overloaded without super" ... bind(list.__setitem__, self)(key, value) ... 10. It is interesting that with this semantics there are

Re: [Python-Dev] Draft proposal: Implicit self in Python 3.0

2006-01-05 Thread Alexander Kozlovsky
I wrote: > 5. Each function have two constant attributes, __class__ and __self__, >both of them have value 'None' Of course, this attributes have names 'im_class' and 'im_self', as before, but can be used with any function. I have not sleep enough last

Re: [Python-Dev] Draft proposal: Implicit self in Python 3.0

2006-01-06 Thread Alexander Kozlovsky
w): print args, kw return bind(func, self, class)(*args, **kw) return replacement Yep, the code in decorators will be more complicated than it is today. I did not get it before... > I guess it depends on what bind(func, self) does outside of > a method

Re: [Python-Dev] os.path.getmtime on Windows

2006-01-15 Thread Alexander Schremmer
NT, i.e. compiling both versions into the dll and just using one? Looking at the file object, the open function uses "_wfopen" which needs Windows NT according to the MSDN lib. So, how is 9x compat ensured here? Kind regards, Alexander ___ Pyt

Re: [Python-Dev] Adding a conditional expression in Py3.0

2005-09-29 Thread Alexander J. Kozlovsky
le expression output. It is a bit more readable from my point of view Best regards, Alexandermailto:[EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev U

Re: [Python-Dev] The `for y in [x]` idiom in comprehensions

2018-02-27 Thread Alexander Belopolsky via Python-Dev
On Mon, Feb 26, 2018 at 7:51 PM, Guido van Rossum wrote: .. > The reason is that for people who are not Python experts there's no obvious > reason why `for VAR = EXPR` should mean one thing and `for VAR in EXPR` > should mean another. This would be particularly surprising for people exposed to Ju

<    3   4   5   6   7   8