[Python-Dev] Sorting

2017-04-05 Thread Ethan Furman

Just want to drop a note and say THANK YOU to everyone for the work in 
improving Python to the 3 branch.

And if you're curious as to why:  I just spent three hours trying to figure out why my comparisons were succeeding when 
they should be raising exceptions -- and then remembered that in 2.x there's a fallback to comparing type names.


G.  :/

So, THANK YOU!!

--
~Ethan~
___
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Sorting

2017-04-05 Thread Oleg Broytman
On Wed, Apr 05, 2017 at 01:36:38PM -0700, Ethan Furman  
wrote:
> Just want to drop a note and say THANK YOU to everyone for the work in 
> improving Python to the 3 branch.
> 
> And if you're curious as to why:  I just spent three hours trying to figure
> out why my comparisons were succeeding when they should be raising
> exceptions -- and then remembered that in 2.x there's a fallback to
> comparing type names.
> 
> G.  :/
> 
> So, THANK YOU!!

   Sorry, let me pour a bit of cold water here. Recently I was busy
porting a few big and small (but complex) programs to Python 3 and was
sending thousands curses every day. str=>unicode is the biggest change
but not the most painful. The worst was when I spent few days hunting
for a subtle bug caused by absent of unbound methods.
   Painful. :-(

> --
> ~Ethan~

Oleg.
-- 
 Oleg Broytmanhttp://phdru.name/[email protected]
   Programmers don't die, they just GOSUB without RETURN.
___
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Sorting

2017-04-05 Thread Steven D'Aprano
On Thu, Apr 06, 2017 at 02:30:06AM +0200, Oleg Broytman wrote:

>Sorry, let me pour a bit of cold water here. Recently I was busy
> porting a few big and small (but complex) programs to Python 3 and was
> sending thousands curses every day. str=>unicode is the biggest change
> but not the most painful. The worst was when I spent few days hunting
> for a subtle bug caused by absent of unbound methods.
>Painful. :-(

I'm curious about this. What do you mean? Python 3 has unbound methods, 
they're just the original, unwrapped function:

py> class K:
... def method(self, arg):
... pass
...
py> K.method



The only(?) functional difference between unbound methods in Python 2 
versus 3 is that in Python 2 they automatically do a type-check that 
`self` is an instance of the class.



-- 
Steve
___
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com