Re: [Python-Dev] Generally bored by installation

2012-11-15 Thread Oleg Broytman
Hello, Christian! On Fri, Nov 16, 2012 at 12:10:09AM +0100, Christian Tismer wrote: > I am bored of installing things. > Bored of things that happen to not work for some minor reasons. > Reasons that are not immediately obvious. > Things that don't work because some special case was not handl

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

2012-11-15 Thread Daniel Holth
Are you familiar with executing directories 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 fac

[Python-Dev] Failed issue tracker submission

2012-11-15 Thread Python tracker
An unexpected error occurred during the processing of your message. The tracker administrator is being notified. Return-Path: X-Original-To: rep...@bugs.python.org Delivered-To: roundup+trac...@psf.upfronthosting.co.za Received: from mail.python.org (mail.python.org [IPv6:2001:888:2000:d::a6])

Re: [Python-Dev] performance of {} versus dict(), de fmd(**kw): return kw trumps all ; -)

2012-11-15 Thread Doug Hellmann
On Nov 14, 2012, at 5:37 PM, Chris Withers wrote: > On 14/11/2012 10:11, mar...@v.loewis.de wrote: >> >> Zitat von Chris Withers : >> >>> a_dict = dict( >>>x = 1, >>>y = 2, >>>z = 3, >>>... >>>) >> >>> What can we do to speed up the former case? >> >> It should be possible

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

2012-11-15 Thread Christian Tismer
Hi guys, I am bored of installing things. Bored of things that happen to not work for some minor reasons. Reasons that are not immediately obvious. Things that don't work because some special case was not handled. Things that compile for half an hour and then complain that something is not as

Re: [Python-Dev] performance of {} versus dict(), de fmd(**kw): return kw trumps all ; -)

2012-11-15 Thread Greg Ewing
Stefan Behnel wrote: This should work as long as this still creates a copy of d at some point: d = {...} dict(**d) It will -- the implementation of the function call opcode always creates a new keyword dict for passing to the called function. -- Greg __

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

2012-11-15 Thread Christian Tismer
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 setup.py develop but I'm not sure if this is the same scheme on windows and Os X. Getting this part right was ra

[Python-Dev] Failed issue tracker submission

2012-11-15 Thread Python tracker
An unexpected error occurred during the processing of your message. The tracker administrator is being notified. Return-Path: X-Original-To: rep...@bugs.python.org Delivered-To: roundup+trac...@psf.upfronthosting.co.za Received: from mail.python.org (mail.python.org [82.94.164.166]) by ps

[Python-Dev] Failed issue tracker submission

2012-11-15 Thread Python tracker
An unexpected error occurred during the processing of your message. The tracker administrator is being notified. Return-Path: X-Original-To: rep...@bugs.python.org Delivered-To: roundup+trac...@psf.upfronthosting.co.za Received: from mail.python.org (mail.python.org [IPv6:2001:888:2000:d::a6])

Re: [Python-Dev] performance of {} versus dict(), de fmd(**kw): return kw trumps all ; -)

2012-11-15 Thread Richard Oudkerk
On 15/11/2012 4:21pm, Terry Reedy wrote: I was thinking that CPython could check the ref count of the input keyword dict to determine whether it is newly created and can be returned or is pre-existing and must be copied. But it seems not so. >>> def d(**x): return sys.getrefcount(x) >>> impor

Re: [Python-Dev] performance of {} versus dict(), de fmd(**kw): return kw trumps all ; -)

2012-11-15 Thread Terry Reedy
On 11/15/2012 9:58 AM, Stefan Behnel wrote: Greg Ewing, 15.11.2012 11:48: mar...@v.loewis.de wrote: It's faster than calling dict() because the dict code will create a second dictionary, and discard the keywords dictionary. Perhaps in the case where dict() is called with keyword args only, it

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

2012-11-15 Thread Alex Gaynor
Stefan Behnel behnel.de> writes: > Right. If that makes a difference, it's another bug. > > Stefan > > It's fixed, with, I will note, fewer lines of code than many messages in this thread: https://bitbucket.org/pypy/pypy/changeset/c30cb1dcb7a9adc32548fd14274e4995 Alex __

Re: [Python-Dev] performance of {} versus dict(), de fmd(**kw): return kw trumps all ; -)

2012-11-15 Thread Stefan Behnel
Greg Ewing, 15.11.2012 11:48: > mar...@v.loewis.de wrote: >> It's faster than calling dict() because the dict code will >> create a second dictionary, and discard the keywords dictionary. > > Perhaps in the case where dict() is called with keyword > args only, it could just return the passed-in ke

[Python-Dev] Failed issue tracker submission

2012-11-15 Thread Python tracker
An unexpected error occurred during the processing of your message. The tracker administrator is being notified. Return-Path: X-Original-To: rep...@bugs.python.org Delivered-To: roundup+trac...@psf.upfronthosting.co.za Received: from mail.python.org (mail.python.org [82.94.164.166]) by ps

Re: [Python-Dev] [BUG] Trailing spaces in pretty-printed JSON

2012-11-15 Thread Leo
On 2012-10-14 02:06 +0800, Xavier Morel wrote: > 1. Why didn't you report that on the tracker? Reported: http://bugs.python.org/issue16476 ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe:

Re: [Python-Dev] performance of {} versus dict(), de fmd(**kw): return kw trumps all ; -)

2012-11-15 Thread Greg Ewing
mar...@v.loewis.de wrote: It's faster than calling dict() because the dict code will create a second dictionary, and discard the keywords dictionary. Perhaps in the case where dict() is called with keyword args only, it could just return the passed-in keyword dictionary instead of creating anot

Re: [Python-Dev] externals?

2012-11-15 Thread Kristján Valur Jónsson
Okay, that means I need to re-install svn, cool. But I should mention that this needs to be mentioned in the core development FAQs, setting up and so forth. There is no mention of it there. Perhaps the unix makefiles get the proper version, but a windows developer has to fetch those externals ma

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

2012-11-15 Thread Kristján Valur Jónsson
When python is being run from a compile environment, it detects this by looking for "Lib" folders in directories above the one containing the executable. (I always thought that this "special" execution mode, hardwired in, was a bit odd, and suggested that this could be made a function of pep405)

[Python-Dev] performance of {} versus dict(), de fmd(**kw): return kw trumps all ; -)

2012-11-15 Thread Łukasz Rekucki
Hi, I posted this (by accident) off the list: > On 2012-11-14, at 23:43 , Chris Withers wrote: > >> On 14/11/2012 22:37, Chris Withers wrote: >>> On 14/11/2012 10:11, mar...@v.loewis.de wrote: def xdict(**kwds): return kwds >>> >>> Hah, good call, this trumps both of the other options