kirby urner wrote:
... Hey, did you know Ellipsis is a new primitive object in Python 3, denoted
... ?
...
Ellipsis
Actually, it has been around for quite a while. Try this in even a much
older Python:
class Funny(object):
def __getitem__(self, *args):
On Wed, May 27, 2009 at 11:45 PM, kirby urnerkirby.ur...@gmail.com wrote:
SNIP
Hey, I was just learning from David Beazley on Safari that __repr__ is
generally supposed to emit a string that'll eval right back to the
object represented. So if I have Modulo type and go k = Modulo(10)
then
Hey, didn't know that!
And that *is* a Funny class you made there, quite twisted thx!
Kirby
On Thu, May 28, 2009 at 8:27 AM, Scott David
Danielsscott.dani...@acm.org wrote:
kirby urner wrote:
... Hey, did you know Ellipsis is a new primitive object in Python 3,
denoted ... ?
...
On Thu, May 28, 2009 at 8:22 AM, kirby urnerkirby.ur...@gmail.com wrote:
SNIP
I was reading about descriptors, again per Holden workshop, and
noticing the author adding at class level, but never making use of the
passed instance argument, only self (inside the descriptor).
Below is the
Scott David Daniels wrote:
kirby urner wrote:
... Hey, did you know Ellipsis is a new primitive object ...
Actually, it has been around for quite a while [broken example]
Sorry, everybody, I started writing, tried the code, and editted the
reply, rather than taking direct quotes. In
Where I could see Ellipsis being used is in an OEIS-like context
(Sloan's ATT thing) and going like [1, 12, 42, 92, ...] which you
then feed to a factory function, say get_seq.
get_seq has lookup powers (ala OEIS) and loads the right looping
construct, then gives you an itertools like thingy that