[IronPython] How can you create set/frozenset from C# ?
fuzzyman at voidspace.org.uk
Thu Oct 30 23:55:41 CET 2008
Dan Eloff wrote:
> It seems to me that you have to use __init__/__new__ supplying
> CodeContext as necessary. Unlike list and tuple which have public
> constructors and PythonOps helpers, there doesn't seem to be any
> public api for creating sets. Am I right?
> Users mailing list
> Users at lists.ironpython.com
SetCollection has a public constructor.
If you need the CodeContext for __new__ then you can get one like this:
LanguageContext language = HostingHelpers.GetLanguageContext(engine);
CodeContext co = new CodeContext(new Scope(), language)
More information about the Ironpython-users