Ignore:
Timestamp:
07/24/07 14:09:01 (6 years ago)
Author:
William Stein <wstein@…>
Branch:
default
Message:

Robert Bradshaw: subtle coercion bug fix.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sage/structure/coerce.pxi

    r5465 r5497  
    3838    if PY_TYPE_CHECK(x,Element): 
    3939        return (<Element>x)._parent 
    40     try: 
    41         # TODO: should the _parent attribute be moved up the tree? 
     40    elif hasattr(x, 'parent'): 
    4241        return x.parent() 
    43     except AttributeError: 
     42    else: 
    4443        return <object>PY_TYPE(x) 
    4544 
Note: See TracChangeset for help on using the changeset viewer.