Skip to content

Commit 511e0f2

Browse files
committed
fixup(NotImplemented): type(NotImplemented)() is not NotImplemented
1 parent bcb7d9e commit 511e0f2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Objects/notimplementedobject.nim

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import ./pyobject
22
import ./stringobject
3+
import ./exceptions
34

4-
declarePyType NotImplemented(tpToken):
5+
declarePyType NotImplemented():
56
discard
67

78
let pyNotImplemented* = newPyNotImplementedSimple() ## singleton
@@ -16,3 +17,5 @@ method `$`*(self: PyNotImplementedObject): string =
1617
implNotImplementedMagic repr:
1718
newPyString self.dollar
1819

20+
implNotImplementedMagic New(tp: PyObject):
21+
return pyNotImplemented

0 commit comments

Comments
 (0)