File tree 1 file changed +19
-1
lines changed
1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -75,5 +75,23 @@ BoundMethods should be run straight away in the vm not make a new vm
75
75
ObjectType in *Type is probably redundant
76
76
- except that Base can be nil
77
77
78
+ Attributes of built in types
79
+ ============================
78
80
79
-
81
+ Use introspection to find methods of built in types and to find attributes
82
+
83
+ When the built in type is created with TypeNew fill up the type Dict
84
+ with the methods and data descriptors (which implement __get__
85
+ and __set__ as appropriate)
86
+
87
+ Introspect attributes by looking for `py:"args"` in the structure
88
+ type. If it is writable it has a ",w" flag `py:"args,w"` - we'll use
89
+ the type of the structure member to convert the incoming arg, so if it
90
+ is a Tuple() we'll call MakeTuple() on it, etc. The attribute can
91
+ also have help on it, eg `py:"__cause__,r,exception cause"`
92
+
93
+ Introspect methods by looking at all public methods
94
+
95
+ Transform the names, so that initial "M__" becomes "__" then lowercase
96
+ the method. Only if the method matches one of the defined function types will it be exported.
97
+ FIXME meta data for help would be nice? How attache metadata to go function?
You can’t perform that action at this time.
0 commit comments