Quesion about the proper use of __slots__

A

Alex Martelli

Peter Hansen said:
Actually, a properly performed "engineering approximation" is done
entirely in one's head, preferably without resorting to calculation at
all.

Of course, but you still need an envelope on whose back to scribble.
Tradition and historical continuity demand it.
The "back of the envelope" ploy is reserved for cases where one is
trying to impress a waitress (which effort is inevitably doomed to fail
of course), or to make it easier to submit the dinner receipt as a
business expense...

That's "back of the restaurant bill", a different though related
technique. Since most restaurants don't print bills on envelopes, the
two are not really comparable.


Alex
 
Z

Zefria

I am aware of this; but with too much Java still running through my
brain I've never bothered with the idea yet because that's simply not
the way I learned and I've never had a chance to need new attributes
for singular instances.

"__slots__ is not a method, so it falls outside that purpose as stated.
" -Alex Martelli

It's listed within the special methods section of the Python Refrence,
was what I ment.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,277
Latest member
VytoKetoReview

Latest Threads

Top