I see in the code on this Sage wiki page the following code:
@interact
def _(order=(1..12)):
Is this (1..n)
syntax unique to Sage or is it something in Python? Also, what does it do?
I see in the code on this Sage wiki page the following code:
@interact
def _(order=(1..12)):
Is this (1..n)
syntax unique to Sage or is it something in Python? Also, what does it do?
It's Sage-specific. You can use preparse
to see how it is desugared to:
sage: preparse("(1..12)")
'(ellipsis_iter(Integer(1),Ellipsis,Integer(12)))'
See here for documentation of ellipsis_iter
, here for information on the preparser.