Re: [Python-Dev] Why does Signature.from_function() have to check the type of its argument?

2013-02-08 Thread Stefan Behnel
Stefan Behnel, 08.02.2013 22:14: > PJ Eby, 08.02.2013 19:46: >> On Fri, Feb 8, 2013 at 10:54 AM, Stefan Behnel wrote: >>> Nick Coghlan, 08.02.2013 16:20: On Sat, Feb 9, 2013 at 1:06 AM, Benjamin Peterson wrote: > 2013/2/8 Stefan Behnel: >> I'm wondering about the purpose of this code i

Re: [Python-Dev] why do we allow this syntax?

2013-02-08 Thread Ian Cordasco
On Feb 8, 2013 3:37 PM, "Xavier Morel" wrote: > > On 2013-02-08, at 18:45 , Chris Withers wrote: > > > On 08/02/2013 16:17, Oscar Benjamin wrote: > >> Decimal.__pos__ uses it to return a Decimal instance that has the > >> default precision of the current Decimal context: > >> > > from decimal

Re: [Python-Dev] Why does Signature.from_function() have to check the type of its argument?

2013-02-08 Thread Stefan Behnel
PJ Eby, 08.02.2013 19:46: > On Fri, Feb 8, 2013 at 10:54 AM, Stefan Behnel wrote: >> Nick Coghlan, 08.02.2013 16:20: >>> On Sat, Feb 9, 2013 at 1:06 AM, Benjamin Peterson wrote: 2013/2/8 Stefan Behnel: > I'm wondering about the purpose of this code in > inspect.Signature.from_function(

Re: [Python-Dev] why do we allow this syntax?

2013-02-08 Thread Xavier Morel
On 2013-02-08, at 18:45 , Chris Withers wrote: > On 08/02/2013 16:17, Oscar Benjamin wrote: >> Decimal.__pos__ uses it to return a Decimal instance that has the >> default precision of the current Decimal context: >> > from decimal import Decimal > d = Decimal('0.3

Re: [Python-Dev] why do we allow this syntax?

2013-02-08 Thread Chris Withers
On 08/02/2013 16:17, Oscar Benjamin wrote: Decimal.__pos__ uses it to return a Decimal instance that has the default precision of the current Decimal context: from decimal import Decimal d = Decimal('0.33') d Decimal('0.33

Re: [Python-Dev] Why does Signature.from_function() have to check the type of its argument?

2013-02-08 Thread PJ Eby
On Fri, Feb 8, 2013 at 10:54 AM, Stefan Behnel wrote: > Nick Coghlan, 08.02.2013 16:20: >> On Sat, Feb 9, 2013 at 1:06 AM, Benjamin Peterson wrote: >>> 2013/2/8 Stefan Behnel: I'm wondering about the purpose of this code in inspect.Signature.from_function(): """ if not

[Python-Dev] Summary of Python tracker Issues

2013-02-08 Thread Python tracker
ACTIVITY SUMMARY (2013-02-01 - 2013-02-08) Python tracker at http://bugs.python.org/ To view or respond to any of the issues listed below, click on the issue. Do NOT respond to this message. Issues counts and deltas: open3847 ( -1) closed 25088 (+60) total 28935 (+59) Open issues wit

Re: [Python-Dev] why do we allow this syntax?

2013-02-08 Thread Oscar Benjamin
On 8 February 2013 16:10, Benjamin Peterson wrote: > 2013/2/8 Chris Withers : >> On 08/02/2013 15:42, Benjamin Peterson wrote: >>> >>> 2013/2/8 Chris Withers: Hi All, Just had a bit of an embarrassing incident in some code where I did: sometotal =+ somevalue >>> >>> >

Re: [Python-Dev] why do we allow this syntax?

2013-02-08 Thread Benjamin Peterson
2013/2/8 Chris Withers : > On 08/02/2013 15:42, Benjamin Peterson wrote: >> >> 2013/2/8 Chris Withers: >>> >>> Hi All, >>> >>> Just had a bit of an embarrassing incident in some code where I did: >>> >>> sometotal =+ somevalue >> >> >> That's just a strange way of expressing >> >> sometotal = +some

Re: [Python-Dev] why do we allow this syntax?

2013-02-08 Thread Chris Withers
On 08/02/2013 15:42, Benjamin Peterson wrote: 2013/2/8 Chris Withers: Hi All, Just had a bit of an embarrassing incident in some code where I did: sometotal =+ somevalue That's just a strange way of expressing sometotal = +somevalue Indeed, but why should this be possible? When could it d

Re: [Python-Dev] why do we allow this syntax?

2013-02-08 Thread Serhiy Storchaka
On 08.02.13 17:39, Chris Withers wrote: Just had a bit of an embarrassing incident in some code where I did: sometotal =+ somevalue I'm curious why this syntax is allowed? I'm sure there are good reasons, but thought I'd ask... And why this syntax is allowed? pi = 3,14 And this: fr

Re: [Python-Dev] Why does Signature.from_function() have to check the type of its argument?

2013-02-08 Thread Stefan Behnel
Nick Coghlan, 08.02.2013 16:20: > On Sat, Feb 9, 2013 at 1:06 AM, Benjamin Peterson wrote: >> 2013/2/8 Stefan Behnel: >>> I'm wondering about the purpose of this code in >>> inspect.Signature.from_function(): >>> >>> """ >>> if not isinstance(func, types.FunctionType): >>> raise TypeErr

Re: [Python-Dev] Why does Signature.from_function() have to check the type of its argument?

2013-02-08 Thread Stefan Behnel
Nick Coghlan, 08.02.2013 16:08: > On Sat, Feb 9, 2013 at 12:09 AM, Stefan Behnel wrote: >> I'm wondering about the purpose of this code in >> inspect.Signature.from_function(): >> >> """ >> if not isinstance(func, types.FunctionType): >> raise TypeError('{!r} is not a Python function'.f

Re: [Python-Dev] why do we allow this syntax?

2013-02-08 Thread Oscar Benjamin
On 8 February 2013 15:39, Chris Withers wrote: > Hi All, > > Just had a bit of an embarrassing incident in some code where I did: > > sometotal =+ somevalue > > I'm curious why this syntax is allowed? I'm sure there are good reasons, but > thought I'd ask... Because '+' can represent an unary pre

Re: [Python-Dev] why do we allow this syntax?

2013-02-08 Thread Xavier Morel
On 2013-02-08, at 16:39 , Chris Withers wrote: > Hi All, > > Just had a bit of an embarrassing incident in some code where I did: > > sometotal =+ somevalue > > I'm curious why this syntax is allowed? I'm sure there are good reasons, but > thought I'd ask… sometotal = (expression) is valid s

Re: [Python-Dev] why do we allow this syntax?

2013-02-08 Thread Chris Angelico
On Sat, Feb 9, 2013 at 2:39 AM, Chris Withers wrote: > Hi All, > > Just had a bit of an embarrassing incident in some code where I did: > > sometotal =+ somevalue > > I'm curious why this syntax is allowed? I'm sure there are good reasons, but > thought I'd ask... For the same reason that you can

Re: [Python-Dev] why do we allow this syntax?

2013-02-08 Thread Benjamin Peterson
2013/2/8 Chris Withers : > Hi All, > > Just had a bit of an embarrassing incident in some code where I did: > > sometotal =+ somevalue That's just a strange way of expressing sometotal = +somevalue > > I'm curious why this syntax is allowed? I'm sure there are good reasons, but > thought I'd ask

Re: [Python-Dev] why do we allow this syntax?

2013-02-08 Thread Donald Stufft
On Friday, February 8, 2013 at 10:39 AM, Chris Withers wrote: > Hi All, > > Just had a bit of an embarrassing incident in some code where I did: > > sometotal =+ somevalue I'm guessing this gets parsed as sometotal = +somevalue > > I'm curious why this syntax is allowed? I'm sure there are good

[Python-Dev] why do we allow this syntax?

2013-02-08 Thread Chris Withers
Hi All, Just had a bit of an embarrassing incident in some code where I did: sometotal =+ somevalue I'm curious why this syntax is allowed? I'm sure there are good reasons, but thought I'd ask... Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - ht

Re: [Python-Dev] Why does Signature.from_function() have to check the type of its argument?

2013-02-08 Thread Nick Coghlan
On Sat, Feb 9, 2013 at 1:06 AM, Benjamin Peterson wrote: > 2013/2/8 Stefan Behnel : >> Hi, >> >> I'm wondering about the purpose of this code in >> inspect.Signature.from_function(): >> >> """ >> if not isinstance(func, types.FunctionType): >> raise TypeError('{!r} is not a Python func

Re: [Python-Dev] Why does Signature.from_function() have to check the type of its argument?

2013-02-08 Thread Nick Coghlan
On Sat, Feb 9, 2013 at 12:09 AM, Stefan Behnel wrote: > Hi, > > I'm wondering about the purpose of this code in > inspect.Signature.from_function(): > > """ > if not isinstance(func, types.FunctionType): > raise TypeError('{!r} is not a Python function'.format(func)) > """ > > Is there

Re: [Python-Dev] Why does Signature.from_function() have to check the type of its argument?

2013-02-08 Thread Benjamin Peterson
2013/2/8 Stefan Behnel : > Hi, > > I'm wondering about the purpose of this code in > inspect.Signature.from_function(): > > """ > if not isinstance(func, types.FunctionType): > raise TypeError('{!r} is not a Python function'.format(func)) > """ > > Is there any reason why this method wo

[Python-Dev] Why does Signature.from_function() have to check the type of its argument?

2013-02-08 Thread Stefan Behnel
Hi, I'm wondering about the purpose of this code in inspect.Signature.from_function(): """ if not isinstance(func, types.FunctionType): raise TypeError('{!r} is not a Python function'.format(func)) """ Is there any reason why this method would have to explicitly check the type of its

Re: [Python-Dev] help with knowledge on how to find which release a fix will land in

2013-02-08 Thread Tshepang Lekhonkhobe
On Fri, Feb 8, 2013 at 2:45 PM, Chris Withers wrote: > On 08/02/2013 11:17, Antoine Pitrou wrote: >> >> Le Fri, 08 Feb 2013 10:58:36 +, >> Chris Withers a écrit : >>> >>> Hi All, >>> >>> Where would I look to find out which release a fix for an issue >>> (http://bugs.python.org/issue15822 if

Re: [Python-Dev] help with knowledge on how to find which release a fix will land in

2013-02-08 Thread Tshepang Lekhonkhobe
On Fri, Feb 8, 2013 at 3:17 PM, Tshepang Lekhonkhobe wrote: > On Fri, Feb 8, 2013 at 2:45 PM, Chris Withers wrote: >> On 08/02/2013 11:17, Antoine Pitrou wrote: >>> >>> Le Fri, 08 Feb 2013 10:58:36 +, >>> Chris Withers a écrit : Hi All, Where would I look to find out whic

Re: [Python-Dev] help with knowledge on how to find which release a fix will land in

2013-02-08 Thread Ronald Oussoren
On 8 Feb, 2013, at 13:45, Chris Withers wrote: > On 08/02/2013 11:17, Antoine Pitrou wrote: >> Le Fri, 08 Feb 2013 10:58:36 +, >> Chris Withers a écrit : >>> Hi All, >>> >>> Where would I look to find out which release a fix for an issue >>> (http://bugs.python.org/issue15822 if you're int

Re: [Python-Dev] help with knowledge on how to find which release a fix will land in

2013-02-08 Thread Antoine Pitrou
Le Fri, 08 Feb 2013 12:45:48 +, Chris Withers a écrit : > On 08/02/2013 11:17, Antoine Pitrou wrote: > > Le Fri, 08 Feb 2013 10:58:36 +, > > Chris Withers a écrit : > >> Hi All, > >> > >> Where would I look to find out which release a fix for an issue > >> (http://bugs.python.org/issue158

Re: [Python-Dev] help with knowledge on how to find which release a fix will land in

2013-02-08 Thread Chris Withers
On 08/02/2013 11:17, Antoine Pitrou wrote: Le Fri, 08 Feb 2013 10:58:36 +, Chris Withers a écrit : Hi All, Where would I look to find out which release a fix for an issue (http://bugs.python.org/issue15822 if you're interested ;-)) will land in? Just read that issue's comments and you'll

Re: [Python-Dev] help with knowledge on how to find which release a fix will land in

2013-02-08 Thread Antoine Pitrou
Le Fri, 08 Feb 2013 10:58:36 +, Chris Withers a écrit : > Hi All, > > Where would I look to find out which release a fix for an issue > (http://bugs.python.org/issue15822 if you're interested ;-)) will > land in? Just read that issue's comments and you'll know in which branches the fix was

[Python-Dev] help with knowledge on how to find which release a fix will land in

2013-02-08 Thread Chris Withers
Hi All, Where would I look to find out which release a fix for an issue (http://bugs.python.org/issue15822 if you're interested ;-)) will land in? cheers, Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk