Chris Angelico writes:
The justification is illogical. However, I personally believe
boilerplate should be omitted where possible;
But it mostly can't be omitted. I wrote 22 classes (all trivial)
yesterday for a Python 3 program. Not one derived directly from
object. That's a bit unusual,
On Sat, Aug 9, 2014 at 8:44 PM, Steven D'Aprano st...@pearwood.info wrote:
It is certainly required when writing code that will behave the same in
version 2 and 3
This is not true. An alternative is to put
__metaclass__ = type
at the top of your module to make all classes in your module
On Aug 10, 2014, at 11:51 AM, Alexander Belopolsky wrote:
This is not true. An alternative is to put
__metaclass__ = type
at the top of your module to make all classes in your module new-style in
python2.
I like this much better, and it's what I do in my own bilingual code. It
makes it much
On Sun, Aug 10, 2014 at 11:51:51AM -0400, Alexander Belopolsky wrote:
On Sat, Aug 9, 2014 at 8:44 PM, Steven D'Aprano st...@pearwood.info wrote:
It is certainly required when writing code that will behave the same in
version 2 and 3
This is not true. An alternative is to put
Hi.
Referring to my discussion on [1] and then on #python this afternoon.
A little background would help people to understand where this was
coming from.
1. I write Python 2 code and have done zero Python-3 specific code.
2. I have always been using class Foo(object) so I do not know the new
On 8/9/2014 2:44 PM, John Yeuk Hon Wong wrote:
Hi.
Referring to my discussion on [1] and then on #python this afternoon.
A little background would help people to understand where this was
coming from.
1. I write Python 2 code and have done zero Python-3 specific code.
2. I have always been
On Sat, Aug 09, 2014 at 02:44:10PM -0400, John Yeuk Hon Wong wrote:
Hi.
Referring to my discussion on [1] and then on #python this afternoon.
A little background would help people to understand where this was
coming from.
1. I write Python 2 code and have done zero Python-3 specific
On Sun, Aug 10, 2014 at 10:44 AM, Steven D'Aprano st...@pearwood.info wrote:
Looking at your comment here:
[1]: https://news.ycombinator.com/item?id=8154471
there is a reply from zeckalpha, who says:
Actually, leaving out `object` is the preferred convention for
Python 3, as they