Paul Prescod wrote: > * I need to associate a Java-style type declaration with a method so > that it can be recognized based on its type during Java method = dispatch. class foo: typemap =3D {} def myfunc(self): pass typemap[myfunc] =3D typeinfo > * I need to associate a "grammar rule" with a Python method so that = the > method is invoked when the parser recognizes a syntactic construct in > the input data. class foo: rules =3D [] def myfunc(self): pass rules.append(pattern, myfunc) > * I need to associate an IDL declaration with a method so that a COM > interface definition can be generated from the source file. class foo: idl =3D {} def myfunc(self): pass idl[myfunc] =3D "declaration" > * I need to associate an XPath "pattern string" with a Python method = so > that the method can be invoked when a tree walker discovers a = particular > pattern in an XML DOM. class foo: xpath =3D []=20 def myfunc(self): pass xpath.append("pattern", myfunc) </F>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4