Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pyston
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
Pyston
Commits
b608bdee
Commit
b608bdee
authored
Mar 07, 2015
by
Chris Toshok
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implement PyNumber_Divmod to fix datetime.timedelta(0)
parent
4480e933
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
src/capi/abstract.cpp
src/capi/abstract.cpp
+6
-2
test/tests/datetime_test.py
test/tests/datetime_test.py
+1
-0
No files found.
src/capi/abstract.cpp
View file @
b608bdee
...
@@ -1132,8 +1132,12 @@ extern "C" PyObject* PyNumber_Remainder(PyObject* lhs, PyObject* rhs) noexcept {
...
@@ -1132,8 +1132,12 @@ extern "C" PyObject* PyNumber_Remainder(PyObject* lhs, PyObject* rhs) noexcept {
}
}
}
}
extern
"C"
PyObject
*
PyNumber_Divmod
(
PyObject
*
,
PyObject
*
)
noexcept
{
extern
"C"
PyObject
*
PyNumber_Divmod
(
PyObject
*
lhs
,
PyObject
*
rhs
)
noexcept
{
try
{
return
binop
(
lhs
,
rhs
,
AST_TYPE
::
DivMod
);
}
catch
(
ExcInfo
e
)
{
Py_FatalError
(
"unimplemented"
);
Py_FatalError
(
"unimplemented"
);
}
}
}
extern
"C"
PyObject
*
PyNumber_Power
(
PyObject
*
,
PyObject
*
,
PyObject
*
o3
)
noexcept
{
extern
"C"
PyObject
*
PyNumber_Power
(
PyObject
*
,
PyObject
*
,
PyObject
*
o3
)
noexcept
{
...
...
test/tests/datetime_test.py
View file @
b608bdee
...
@@ -5,3 +5,4 @@ import datetime
...
@@ -5,3 +5,4 @@ import datetime
print
repr
(
datetime
.
time
())
print
repr
(
datetime
.
time
())
print
datetime
.
datetime
.
__base__
print
datetime
.
datetime
.
__base__
print
repr
(
datetime
.
datetime
(
1
,
2
,
3
))
print
repr
(
datetime
.
datetime
(
1
,
2
,
3
))
print
str
(
datetime
.
timedelta
(
0
))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment