Re: [Python-Dev] IronPython specific code in inspect module

2009-05-20 Thread Sebastien Binet
On Wednesday 20 May 2009 13:54:56 David Stanek wrote: > On Wed, May 20, 2009 at 7:13 AM, Doug Hellmann wrote: > > On May 19, 2009, at 10:21 PM, David Stanek wrote: > >> It seems that using a technique similar to dependency injection could > >> provide some value. DI allows implementations conform

Re: [Python-Dev] IronPython specific code in inspect module

2009-05-20 Thread David Stanek
On Wed, May 20, 2009 at 7:13 AM, Doug Hellmann wrote: > > On May 19, 2009, at 10:21 PM, David Stanek wrote: > >> >> It seems that using a technique similar to dependency injection could >> provide some value. DI allows implementations conforming to some >> interface to be injected into a running a

Re: [Python-Dev] IronPython specific code in inspect module

2009-05-20 Thread Doug Hellmann
On May 19, 2009, at 10:21 PM, David Stanek wrote: On Tue, May 19, 2009 at 9:26 PM, Benjamin Peterson > wrote: 2009/5/19 Michael Foord : I have IronPython specific versions of several of these functions which use .NET reflection and inspect could fallback to if sys.platform == 'cli'. Would i

Re: [Python-Dev] IronPython specific code in inspect module

2009-05-19 Thread Daniel Diniz
Dino Viehland wrote: > What about instead defining __argspec__ for built-in functions/method > objects and allowing all the implementations to implement it?  We could > all agree to return: > > [ >        (return_type, (arg_types,...)), >        (return_type, (arg_types,...)), > ] > > Then inspect

Re: [Python-Dev] IronPython specific code in inspect module

2009-05-19 Thread Dino Viehland
Michael Foord wrote: > I have IronPython specific versions of several of these functions which > use .NET reflection and inspect could fallback to if sys.platform == > 'cli'. Would it be ok for me to add these to the inspect module? > Obviously the tests would only run on IronPython... The behaviou

Re: [Python-Dev] IronPython specific code in inspect module

2009-05-19 Thread Benjamin Peterson
2009/5/19 Maciej Fijalkowski : > From my observation (mostly according to jython), such changes easily get out > of > sync. The net result is that you have one, outdated, version in stdlib > and other implementation, like IronPython is maintaining it's own > anyway. IMO it's easy enough > to maint

Re: [Python-Dev] IronPython specific code in inspect module

2009-05-19 Thread David Stanek
On Tue, May 19, 2009 at 9:26 PM, Benjamin Peterson wrote: > 2009/5/19 Michael Foord : >> I have IronPython specific versions of several of these functions which use >> .NET reflection and inspect could fallback to if sys.platform == 'cli'. >> Would it be ok for me to add these to the inspect modul

Re: [Python-Dev] IronPython specific code in inspect module

2009-05-19 Thread Maciej Fijalkowski
On Tue, May 19, 2009 at 7:26 PM, Benjamin Peterson wrote: > 2009/5/19 Michael Foord : >> I have IronPython specific versions of several of these functions which use >> .NET reflection and inspect could fallback to if sys.platform == 'cli'. >> Would it be ok for me to add these to the inspect modul

Re: [Python-Dev] IronPython specific code in inspect module

2009-05-19 Thread Benjamin Peterson
2009/5/19 Michael Foord : > I have IronPython specific versions of several of these functions which use > .NET reflection and inspect could fallback to if sys.platform == 'cli'. > Would it be ok for me to add these to the inspect module? Obviously the > tests would only run on IronPython... The beh

[Python-Dev] IronPython specific code in inspect module

2009-05-19 Thread Michael Foord
Hello all, The inspect module (inspect.get_argspec etc) work fine for Python functions and classes in IronPython, but they don't work on .NET types which don't have the Python function attributes like im_func etc. I have IronPython specific versions of several of these functions which use .N