At 09:46 PM 5/29/04 +0200, Wiktor Sadowski wrote: >---------------------------------------------------------------------------- >-------- >in import_from (ceval.c): >if (x == NULL && PyErr_ExceptionMatches(PyExc_AttributeError)) { > if(!PyModule_GetState(v)) > /*raise the error and warn against circular import*/ > else > /*default error*/ >---------------------------------------------------------------------------- >-------- >the same in PyGeneric_GetAttr (object.c): >/* before raising an error*/ >if(PyModule_Check(obj) && !PyModule_GetState(obj)) > /*add a circular import warning to the error string*/ >else > /*default error*/ >---------------------------------------------------------------------------- >-------- IMO, if this approach is used, the module type should instead get a custom tp_getattro method that checks the flag, rather than scattering this logic across unrelated functions.
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