#18529: Topological manifolds: basics
-------------------------------------+-------------------------------------
Reporter: egourgoulhon | Owner: egourgoulhon
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-6.10
Component: geometry | Resolution:
Keywords: topological | Merged in:
manifolds | Reviewers:
Authors: Eric Gourgoulhon | Work issues:
Report Upstream: N/A | Commit:
Branch: | 902908b41a95d3455bfcc497997ad2054c530a96
public/manifolds/top_manif_basics | Stopgaps:
Dependencies: #18175 |
-------------------------------------+-------------------------------------
Comment (by egourgoulhon):
Replying to [comment:48 jdemeyer]:
> In think this also holds for `type(foo)` instead if `foo.__class__` but
I'm not 100% sure if those are really equivalent.
From [http://stackoverflow.com/questions/1060499/difference-between-
typeobj-and-obj-class this link] and
[http://stackoverflow.com/questions/10386166/python-self-class-vs-typeself
that one], it seems that for Python new-style classes (i.e. the only
classes used in Sage), `type(foo)` is fully equivalent to `foo.__class__`
and it is indeed best practice to use `type(foo)`.
--
Ticket URL: <http://trac.sagemath.org/ticket/18529#comment:50>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.