Re: [Python-Dev] Drop the new time.wallclock() function?

2012-03-13 Thread Christian Tismer
Parallels or Virtualbox quite often. There the "wall clock" stuff notoriously does not work. It would be good (but difficult?) if the supposed-to-be-accurate clock could test itself, if it works at all, and replace itself with a fallback. In my case, this causes quite a few PyPy tests

Re: [Python-Dev] Drop the new time.wallclock() function?

2012-03-13 Thread Christian Tismer
s hardware where this api fails (virtual or not?) Perhaps there is no real need to have a fallback mechanism, and it would even be best to write such a mechanism inside the function itself, and just return getsystemtimeasfiletime() instead. K -Original Message----- From: Christian Tismer [

[Python-Dev] package imports, sys.path and os.chdir()

2012-04-26 Thread Christian Tismer
, I just would like to understand why. cheers -- chris -- Christian Tismer :^)<mailto:tis...@stackless.com> tismerysoft GmbH : Have a break! Take a ride on Python's Karl-Liebknecht-Str. 121 :*Starship* http://starship.python.net/ 14482 Potsdam

Re: [Python-Dev] package imports, sys.path and os.chdir()

2012-04-27 Thread Christian Tismer
On 27.04.12 02:39, Nick Coghlan wrote: On Fri, Apr 27, 2012 at 7:30 AM, Christian Tismer wrote: No big deal and easy to work around, I just would like to understand why. I don't like it either and want to change it, but I'm also not going to mess with it until the importlib bootst

Re: [Python-Dev] package imports, sys.path and os.chdir()

2012-04-27 Thread Christian Tismer
On 27.04.12 22:00, Brett Cannon wrote: On Fri, Apr 27, 2012 at 10:39, Christian Tismer <mailto:tis...@stackless.com>> wrote: On 27.04.12 02:39, Nick Coghlan wrote: On Fri, Apr 27, 2012 at 7:30 AM, Christian Tismermailto:tis...@stackless.com>> wrote:

Re: [Python-Dev] package imports, sys.path and os.chdir()

2012-04-29 Thread Christian Tismer
the real question I was after was "can os.chdir() be freely used?" It would be great to get "yes" or "no", but the answer is right now "it depends". cheers - chris -- Christian Tismer :^)<mailto:tis...@stackless.com> tismerysoft

Re: [Python-Dev] package imports, sys.path and os.chdir()

2012-04-29 Thread Christian Tismer
full path etc. is deeply hidden in a C function as a side effect. Brr! It would be much cleaner and easier if that stuff would be ignored today and called a Python implementation, instead. Is that in the plans to get rid of C for such stuff? I hope so :-) cheers -- Chris -- Christian

[Python-Dev] dir() in inspect.py ?

2012-05-15 Thread Christian Tismer
the best example for clean code that is consistent with the docs. Is the usage of dir() correct in this context or is the doc right? It would be nice to add a sentence of clarification if the use of dir() is in fact the correct way to implement inspect. cheers - chris -- Christian Tismer

Re: [Python-Dev] dir() in inspect.py ?

2012-05-21 Thread Christian Tismer
sys._getframe() are declared as deprecated. """ This is no longer recommended to use. Use inspect.currentframe instead """ cheers - chris -- Christian Tismer :^)<mailto:tis...@stackless.com> tismerysoft GmbH : Have a break! Take a

Re: [Python-Dev] PEP 405 (built-in virtualenv) status

2012-06-02 Thread Christian Tismer
ciate this effort very well, as we are heavily using virtualenv in a project. One urgent question: will this feature be backported to Python 2.7? We still need 2.7 for certain reasons (PyPy is not ready for 3.x). cheers - chris -- Christian Tismer :^)<mailto:tis...@stackless.com

Re: [Python-Dev] PEP 405 (built-in virtualenv) status

2012-06-02 Thread Christian Tismer
ly ;-) So please let's abandon the old 'if exists ...' pattern, at least this one time. By the explicit cfg file, the file can clearly say if there is a virtual env or not. Together with removing magic from the .dll, the situation at least for windows would greatly improve. ciao - c

Re: [Python-Dev] PEP 405 (built-in virtualenv) status

2012-06-03 Thread Christian Tismer
s what it needs. Am I somehow blinded, maybe? (yes, you all know that I am, so please be patient with me) -- Chris -- Christian Tismer :^)<mailto:tis...@stackless.com> tismerysoft GmbH : Have a break! Take a ride on Python's Karl-Liebknecht-Str. 12

Re: [Python-Dev] PEP 405 (built-in virtualenv) status

2012-06-04 Thread Christian Tismer
On 6/4/12 4:11 PM, Carl Meyer wrote: Hello Christian, On 06/03/2012 03:56 PM, Éric Araujo wrote: Le 02/06/2012 12:59, Christian Tismer a écrit : One urgent question: will this feature be backported to Python 2.7? Features are never backported to the stable versions. virtualenv still exists

[Python-Dev] Setting project home path the best way

2012-11-11 Thread Christian Tismer
Hi friends, I have a project that has its root somewhere on my machine. This project has many folders and contains quite some modules. There is a common root of the module tree, and I want to use - either absolute imports - relative imports with '.' Problem: - I want to run any module inside

[Python-Dev] Relatwd: py3 import strategy (was: Setting project home path the best way(

2012-11-11 Thread Christian Tismer
is another reason why I dislike the absence of __init__. : Rhere is no longer an indicator that pretty clearly defines the root of my module heirarchy. Cheers, hoping for enlightment - chris Sent from my Ei4Steve On Nov 11, 2012, at 21:31, Christian Tismer wrote: > Hi friends, > >

Re: [Python-Dev] Relatwd: py3 import strategy

2012-11-11 Thread Christian Tismer
Hi Eric, On 11.11.12 22:45, Eric Snow wrote: On Sun, Nov 11, 2012 at 1:53 PM, Christian Tismer mailto:tis...@stackless.com>> wrote: Once again on this: With the introduction of module folders without __init__, it has become even harder to deduce a sensible projec

Re: [Python-Dev] Setting project home path the best way SOLVED

2012-11-12 Thread Christian Tismer
s great when people help me to leave a dead-lock in my brain :-) cheers - Chris -- Christian Tismer :^) <mailto:tis...@stackless.com> Software Consulting : Have a break! Take a ride on Python's Karl-Liebknecht-Str. 121 :*Starship* http://starship.p

Re: [Python-Dev] Setting project home path the best way

2012-11-15 Thread Christian Tismer
on looks. > > K > > >> -Original Message- >> From: Python-Dev [mailto:python-dev- >> bounces+kristjan=ccpgames@python.org] On Behalf Of Christian Tismer >> Sent: 11. nóvember 2012 20:31 >> To: python-dev@python.org >> Subject: [Python-Dev] Set

[Python-Dev] Generally boared by installation (Re: Setting project home path the best way)

2012-11-15 Thread Christian Tismer
ng > up the hierarchy and finding the proper root. > site.py is there to merely import sitecustomize.py, in case a site.py is not > found in all the default places python looks. > > K > > >> -Original Message- >> From: Python-Dev [mailto:python-dev- >>

Re: [Python-Dev] Setting project home path the best way

2012-11-16 Thread Christian Tismer
having __main__.py as python scripts? Daniel Holth On Nov 15, 2012, at 4:43 PM, Christian Tismer wrote: Hi Kristjan, does that mean that your scheme simply works, without any config step necessary after I did my checkout? This would in fact be an interesting alternative to Python

Re: [Python-Dev] Generally boared by installation (Re: Setting project home path the best way)

2012-11-20 Thread Christian Tismer
o reference it? Maybe there could be some auxiliary info page with proper keywords that collects links to relevant discussions like this. Do we have such a thing already? ciao - chris -- Christian Tismer :^) <mailto:tis...@stackless.com> Software Consulting : Have a bre

Re: [Python-Dev] Draft PEP for time zone support.

2012-12-12 Thread Christian Tismer
the exception to be raised, or a callable to handle this case? Sloppy coding can be dangerous. So maybe the warning module could be helpful as well: If None is passed and no explicit flag/exception/callable given, bother the user with a warning message ;-) cheers - chris -- Christian Tismer

Re: [Python-Dev] Why no venv in existing directory?

2013-01-06 Thread Christian Tismer
Minor correction: On 06.01.13 19:10, Christian Tismer wrote: Yes, you can do the upgrade, but there are a few flaws which keep me from using this: It is pretty common to use virtualenv inside a mercurial checkout. With venv, installation with python3 -m venv my-repos complains that the

Re: [Python-Dev] Why no venv in existing directory?

2013-01-06 Thread Christian Tismer
for this: http://bugs.python.org/issue15776 Stefan On 23.07.2012, at 09:09, Stefan H. Holek wrote: The feature certainly is on *my* wish-list but I might be alone here. ;-) -- Christian Tismer :^) <mailto:tis...@stackless.com> Software Consulting : Have a break! Take a

[Python-Dev] efficient string concatenation (yep, from 2004)

2013-02-12 Thread Christian Tismer
ed all over the place and became a very common pattern since introduced. /How ironic that a foreseen problem occurs _now_, and _there_ :-)// / cheers -- chris (*) http://pypy.readthedocs.org/en/latest/cpython_differences.html http://pypy.org/compat.html http://pypy.org/performance.html -- Chr

Re: [Python-Dev] Usage of += on strings in loops in stdlib

2013-02-12 Thread Christian Tismer
thon": There are obviously good things, but "obvious" is the finest liar. -- Christian Tismer :^) <mailto:tis...@stackless.com> Software Consulting : Have a break! Take a ride on Python's Karl-Liebknecht-Str. 121 :*Starship* http://star

Re: [Python-Dev] Usage of += on strings in loops in stdlib

2013-02-12 Thread Christian Tismer
ct was, if any at all. Would ropes be an answer (and a simple way to cope with string mutation patterns) as an alternative implementation, and therefore still justify the usage of that pattern? -- Christian Tismer :^) <mailto:tis...@stackless.com> Software Consulting

Re: [Python-Dev] efficient string concatenation (yep, from 2004)

2013-02-13 Thread Christian Tismer
en traps in larger code bases, documentation is needed that clearly gives a warning saying "don't do that", like CS students learn for most other languages. cheers - chris -- Christian Tismer :^) <mailto:tis...@stackless.com> Software Consulting

Re: [Python-Dev] efficient string concatenation (yep, from 2004)

2013-02-13 Thread Christian Tismer
On 13.02.13 13:10, Steven D'Aprano wrote: On 13/02/13 10:53, Christian Tismer wrote: Hi friends, _efficient string concatenation_ has been a topic in 2004. Armin Rigo proposed a patch with the name of the subject, more precisely: /[Patches] [ python-Patches-980695 ] efficient s

Re: [Python-Dev] Usage of += on strings in loops in stdlib

2013-02-13 Thread Christian Tismer
is more than 3 and some of them are literal strings. Fixed: x = ('%s' * len(abcd)) % abcd Which becomes in the new formatting style x = ('{}' * len(abcd)).format(*abcd) hmm, hmm, not soo nice -- Christian Tismer :^) <mailto:tis...@stackless.

Re: [Python-Dev] Usage of += on strings in loops in stdlib

2013-02-13 Thread Christian Tismer
es, it's jitted. How about the .format() style: Is that jitted as well? In order to get people to prefer .format over __mod__, it would be nice if PyPy made this actually _faster_ :-) -- Christian Tismer :^) <mailto:tis...@stackless.com> Software Consulting :

Re: [Python-Dev] efficient string concatenation (yep, from 2004)

2013-02-13 Thread Christian Tismer
Hey Nick, On 13.02.13 15:44, Nick Coghlan wrote: On Wed, Feb 13, 2013 at 10:06 PM, Christian Tismer wrote: To avoid such hidden traps in larger code bases, documentation is needed that clearly gives a warning saying "don't do that", like CS students learn for most other langu

Re: [Python-Dev] Usage of += on strings in loops in stdlib

2013-02-13 Thread Christian Tismer
reader not to use in-place add when it is not optimized. If += is anyway a bit slower than other ways, forget it. I would then maybe add a commend somewhere that says "avoiding '+=' because it is not reliable" or something. cheers - chris -- Christian Tismer :^) &l

Re: [Python-Dev] efficient string concatenation (yep, from 2004)

2013-02-13 Thread Christian Tismer
Hi Lennart, Sent from my Ei4Steve On Feb 13, 2013, at 8:42, Lennart Regebro wrote: >> Something is needed - a patch for PyPy or for the documentation I guess. > > Not arguing that it wouldn't be good, but I disagree that it is needed. > > This is only an issue when you, as in your proof, have

Re: [Python-Dev] efficient string concatenation (yep, from 2004)

2013-02-13 Thread Christian Tismer
7;m shutting up, intentionally.) -- Christian Tismer :^) <mailto:tis...@stackless.com> Software Consulting : Have a break! Take a ride on Python's Karl-Liebknecht-Str. 121 :*Starship* http://starship.python.net/ 14482 Potsdam: PGP key -> http

Re: [Python-Dev] The other Py2.4 issue

2004-12-11 Thread Christian Tismer
eded is a simple but secure notification method. Probably I need one windows machine which is always online. ciao - chris -- Christian Tismer :^) <mailto:[EMAIL PROTECTED]> tismerysoft GmbH : Have a break! Take a ride on Python's Johannes-Niemeyer-

[Python-Dev] Ann: PyPy Sprint before PYCON 2005 in Washington

2005-02-14 Thread Christian Tismer
if applicable. Registered Participants --- all days: Jacob Hallén Armin Rigo Holger Krekel Samuele Pedroni Anders Chrigström Bea Düring Christian Tismer Richard Emslie -- Christian Tismer :^) <mailto:[EMAIL

Re: [Python-Dev] Python 3000 Process

2006-03-19 Thread Christian Tismer
Guido van Rossum wrote: ... > Please don't respond with answers to these questions -- each of them > is worth several threads. Instead, ponder them, and respond with a +1 > or -1 on the creation of the python-3000 mailing list. We'll start > discussing the issues there -- or here, if the general s

Re: [Python-Dev] Adding Python-Native Threads

2005-06-30 Thread Christian Tismer
ke some background monitoring or other stuff which is not really involved in you control/data flow. ciao - chris -- Christian Tismer :^) <mailto:[EMAIL PROTECTED]> tismerysoft GmbH : Have a break! Take a ride on Python's Johannes-Niemeyer-Weg 9A

Re: [Python-Dev] Conditional Expression Resolution

2005-09-29 Thread Christian Tismer
like a bot. Please shut down and get adjusted. Guidos don't say that. :-) -- Christian Tismer :^) <mailto:[EMAIL PROTECTED]> tismerysoft GmbH : Have a break! Take a ride on Python's Johannes-Niemeyer-Weg 9A :*Starship* http://starship.python.ne

[Python-Dev] deque alternative (was: Linked lists)

2005-12-25 Thread Christian Tismer
thing, if lists are used in a dequeue-style manner. Or is this maybe too much magic happening? merry christmas -- chris -- Christian Tismer :^) <mailto:[EMAIL PROTECTED]> tismerysoft GmbH : Have a break! Take a ride on Python's Johannes-Niemeyer-Weg 9A

Re: [Python-Dev] deque alternative

2005-12-26 Thread Christian Tismer
Martin Blais wrote: > On 12/25/05, Christian Tismer <[EMAIL PROTECTED]> wrote: [is auto-dequeue too much magic?] > IMO it's a little bit too much magic. Plus, if you pass these > instances around e.g. between libraries, how could you determine with > certainty the

Re: [Python-Dev] deque alternative (was: Linked lists)

2005-12-26 Thread Christian Tismer
Hi all, not addressing anybody directly here, but this thread is about my dequeue question. It would just be nice if you could use the original thread topic or a different one to discuss the original question. -- Christian Tismer :^) <mailto:[EMAIL PROTECTED]> tismerysof

Re: [Python-Dev] deque alternative

2005-12-27 Thread Christian Tismer
27;t worry. Don't worry, I'm not expecting anything positive from python-dev, and the only thing that makes me still unhappy is unreflected abuses of my changed topic, but that's a minor matter of taste :-)) all the best -- chris -- Christian Tismer :^) <ma

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

2006-01-14 Thread Christian Tismer
the win32 documentation seems to have no hints about this. I assumend the value would be in UTC, but it is obviously not. Is there a way to circumvent this problem, or am I missing something? If this is not the expected behavior, then it might make sense to find a patch. thanks -- chris -- Christ

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

2006-01-15 Thread Christian Tismer
se Unicode file names on one system, and > ANSI file names on the other. Correcting it just for NT/XP would make the majority of people happy, IMHO. cheers - chris -- Christian Tismer :^) <mailto:[EMAIL PROTECTED]> tismerysoft GmbH : Have a break! Take a

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

2006-01-16 Thread Christian Tismer
Martin v. Löwis wrote: > Christian Tismer wrote: >> 1. create a file >> 2. get it's os.path.getmtime() >> 3. change your time zone >> 4. get os.path.getmtime again >> >> compare - the time stamps are different. >> Change the time zone back,

Re: [Python-Dev] any support for a methodcaller HOF?

2006-02-03 Thread Christian Tismer
mbda does support local scope, like here: >>> def locallambda(x, y): ... func = lambda: x+y ... return func ... >>> f=locallambda(2, 3) >>> f() 5 >>> ciao - chris -- Christian Tismer :^) <mailto:[EMAIL PROTECTED]> tismerysoft

[Python-Dev] Re: Deprecate Py_TRASHCAN_SAFE_BEGIN/END in 3.10?

2021-08-19 Thread Christian Tismer-Sperling
), can't we think of replacing it somehow by functions in the case of the Limited API? The API is so often used that it would make sense to _always_ don't crash deeply nested structures. Or do you think it makes no sense at all? Then let's turn it into a no-op. But the current mixed

[Python-Dev] PyPy on PySide6 is there: PyPy with a Gui

2022-02-03 Thread Christian Tismer-Sperling
think to send an official announce when this is available on pip. This effort marks the completion of my PyPy support, which began in 2003 and ended involuntarily in 2006 due to a stroke. All the best -- Chris -- Christian Tismer-Sperling:^) tis...@stackless.com Software Consulting

[Python-Dev] Re: PyPy on PySide6 is there: PyPy with a Gui

2022-02-04 Thread Christian Tismer-Sperling
PyPy might create much interest for both projects. Cheers - Chris -- Christian Tismer-Sperling:^) tis...@stackless.com Software Consulting : http://www.stackless.com/ Strandstraße 37 : https://github.com/PySide 24217 Schönberg : GPG key -> 0xF

[Python-Dev] Some pattern annoyance

2023-08-02 Thread Christian Tismer-Sperling
return 4 * 1000, r So what is missing seems to be a notion of const-ness, which could be dynamically deduced. Am I missing something? -- Christian Tismer-Sperling:^) tis...@stackless.com Software Consulting : http://www.stackless.com/ Strandstraße 37

[Python-Dev] Re: Some pattern annoyance

2023-08-02 Thread Christian Tismer-Sperling
On 02.08.23 13:23, Barry wrote: On 2 Aug 2023, at 12:03, Christian Tismer-Sperling wrote: Hi folks, I just used Structural Pattern Matching quite intensively and I'm pretty amazed of the new possibilities. But see this code, trying to implement Mark Pilgrim's regex algorithm

[Python-Dev] Re: Some pattern annoyance

2023-08-02 Thread Christian Tismer-Sperling
funnily - slower! Using the clumsy if-guards felt slow but isn't. Then I generated functions even, with everything as constants, and now the SPM version in fact out-performs the regex slightly! But at last, I found an even faster and correct algorithm by a different approach, which ends now

[Python-Dev] Re: Some pattern annoyance

2023-08-03 Thread Christian Tismer-Sperling
ieve it's accidental that match-case sequence patterns won't match str, bytes or bytearrray objects - regexen are the tool already optimised for that purpose, so it's quite impressive that you are managing to approach the same level of performance! Kind regards, Steve On Wed,

<    1   2