That's a valid design point; I didn't implement the Python dbgp client but I imagine there was a reason for it. As it happens, _getframe is the only single-underscore method in sys, but it also happens to be a pretty useful one if you are implementing a debugger, with no obvious wrapper in the 'public' namespace in that module. So I guess pragmatism wins there?
cheers, JeffG Nathan R. Ernst wrote: > I don't mean to flame, but Python protocol dictates that methods/members > preceded by "_" are generally not supposed to be referred to. I guess you > could kind of consider them 'protected', whilst members preceded by a > double-underscore are considered 'private' (despite being accessible if you > de-mangle the names manually). > > Perhaps the modules relying upon behavior supplied by these modules should > have defects assigned against them for using these methods, as well? If its > generally accepted that a Python implementation should provide methods > prefixed by "_" on built-ins, maybe they ought to be moved towards more > prominent, public names? > > Just some random thoughts on the topic... > > -Nathan > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Jeff Griffiths > Sent: Thursday, October 05, 2006 12:34 PM > To: Discussion of IronPython > Subject: Re: [IronPython] Standard Python Debugging not supported > > Dino Viehland wrote: >> Sys._getframe() is likely significantly harder to implement. I'd be >> a little bit surprised if we get this into 1.1 but it'd be nice to >> get at some point in the future. The hard part of this probably >> isn't supporting sys._getframe() but actually supporting >> sys._getframe(depth). > >> Do you know if the parameterless version will unblock you, or do you >> need the full blown functionality? > > Komodo's debugger only makes calls like: > > sys._getframe().f_back > > We don't seem to pass arguments in, so I expect sys._getframe() without > parameters might work. > > JeffG > > ps for the curious, the debugger implementation we use is FOSS, and > available here: > > http://aspn.activestate.com/ASPN/Downloads/Komodo/RemoteDebugging > > The DBGP protocol it is based on is doc'd here: > > http://www.xdebug.org/docs-dbgp.php > > > > > > > > _______________________________________________ > users mailing list > [email protected] > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > _______________________________________________ > users mailing list > [email protected] > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com _______________________________________________ users mailing list [email protected] http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
