On Tuesday, November 15, 2016 at 6:32:34 PM UTC+1, Nils Bruin wrote:
>
> On Monday, November 14, 2016 at 10:49:56 PM UTC-8, Ralf Stephan wrote:
>>
>>
>> so it seems the Python abs can be overridden.
>>
>
> Yes, abs is not a keyword. It's just a name that's by default bound to
> __builtin__.abs .
On Monday, November 14, 2016 at 10:49:56 PM UTC-8, Ralf Stephan wrote:
>
>
> so it seems the Python abs can be overridden.
>
Yes, abs is not a keyword. It's just a name that's by default bound to
__builtin__.abs . However, given that python's "abs" gives access to a
protocol that allows custom
On Tuesday, November 15, 2016 at 4:36:01 AM UTC+1, Nils Bruin wrote:
>
> ... The "abs" in the global namespace is just the generic python one:
> abs(a) dispatches to a.__abs__()
>
> sage: class A(object):
> : def __abs__(self):
> : return "abs"
> :
> sage: a=A()
> sage
On Monday, November 14, 2016 at 12:49:17 PM UTC-8, Paul Masson wrote:
>
> Doesn't the explicit alias to abs_symbolic put abs into the global name
> space as a symbolic function? Why does an import of abs create more
> problems than the alias? Is this a general Python problem or something
> speci