Fable.Python
Fable.Python copied to clipboard
Added string from stdlib
Some functions from "string", although I'm struggling with 'Template' and 'Formatter' classes. (https://github.com/python/typeshed/blob/master/stdlib/string.pyi#L22) How should they be bind ? Is there any example .. ? Maybe it's using [<AbstractClass>] or some other way
For string format I was planning to do this:
type System.String with
[<Emit("$0.format($1...)")>]
member self.format([<ParamArray>] args: Object[]) = nativeOnly
Is it something similar you need to do for the Formatter class? I've btw added a TestString.fs file, so you can add more unit-tests there for string handling.
Some features like named arguments for format is currently blocked by #18