Opened 8 years ago
Last modified 4 years ago
#16085 closed defect
Python 3 preparation: Py2 vs. Py3 value of type() in doctests — at Version 1
Reported by: | wluebbe | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-duplicate/invalid/wontfix |
Component: | python3 | Keywords: | python3 |
Cc: | embray | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
In Py2 we have
Python 2.7.5+ (default, Feb 27 2014, 19:37:08) [GCC 4.8.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> b = True >>> type(b) <type 'bool'>
while in Py3
Python 3.3.2+ (default, Feb 28 2014, 00:52:16) [GCC 4.8.1] on linux Type "help", "copyright", "credits" or "license" for more information. >>> b = True >>> type(b) <class 'bool'>
The result may be unified with isinstance()
.
Py2
>>> isinstance(b, bool) True
and Py3
>>> isinstance(b, bool) True
About 161 py module are effected.
This ticket is tracked as a dependency of meta-ticket ticket:16052.
Note: See
TracTickets for help on using
tickets.