You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to try to implement hashlib (PR will follow).
For now I have implemented Type, module, module method and some "magic methods", but I cannot figure out how to implement object methods such as update, hexdigest etc.
This isn't particularly elegant at the moment, but see py/generator.go for an example. You basically add the method objects to the type's Dict by hand.
GeneratorType.Dict["send"] =MustNewMethod("send", func(selfObject, valueObject) (Object, error) {
returnself.(*Generator).Send(value)
}, 0, "send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")
I want to try to implement
hashlib
(PR will follow).For now I have implemented
Type
,module
, module method and some "magic methods", but I cannot figure out how to implement object methods such asupdate
,hexdigest
etc.Here is my WIP implementation.
Thanks in advance.
The text was updated successfully, but these errors were encountered: