[Python-ideas] Proposal: Abolition of bare except clauses

M.-A. Lemburg mal at egenix.com
Sat Apr 11 17:29:43 CEST 2015


On 11.04.2015 17:15, Steven D'Aprano wrote:
> On Sat, Apr 11, 2015 at 11:44:23PM +1000, Chris Angelico wrote:
> 
>> Every document I've ever seen has taken one of two attitudes toward
>> old-style classes. Either they should be considered deprecated, and
>> every class you define should explicitly subclass something; or
>> they're a really cool micro-optimization with a few fancy
>> flexibilities that new-style classes don't have, but which come up
>> only in the most obscure cases.
> 
> I wouldn't necessarily believe that classic classes are still faster 
> than new-style classes. I think it was certainly true back in the 2.2 
> and 2.3 days, but probably not in 2.7. In any case, I'd like to see the 
> benchmarks demonstrating a speed advantage to classic classes before 
> believing that they are an optimization in practice.

See here (slide 39ff):
http://www.egenix.com/library/presentations/PyCon-UK-2014-When-performance-matters/
https://github.com/egenix/when-performance-matters

Instance attribute lookups are faster on old-style classes.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Apr 11 2015)
>>> Python Projects, Coaching and Consulting ...  http://www.egenix.com/
>>> mxODBC Plone/Zope Database Adapter ...       http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________

::::: Try our mxODBC.Connect Python Database Interface for free ! ::::::

   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611
               http://www.egenix.com/company/contact/


More information about the Python-ideas mailing list