LionHeart123 / pyscripter

Automatically exported from code.google.com/p/pyscripter
0 stars 0 forks source link

Variables window lists instance methods #676

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install networkx, see http://networkx.lanl.gov/
2. Make a call as follows:
import networkx as nx
...
G = nx.gnm_random_graph( 50, 200 )
3. Run this in the debugger and inspect G in the Variables window. 

Observe that all the functions associated with the the relevant class are 
present. I'd expect to see member variables only.

What version of the product are you using? On what operating system?
2.5.3.0 x64 Win7-64.

Please see attached screenshot.

Original issue reported on code.google.com by haslett....@gmail.com on 25 Jul 2012 at 9:31

Attachments:

GoogleCodeExporter commented 9 years ago
The variables window displays the namespace of the variable, i.e. whatever you 
get by using the dir() function.

Original comment by pyscripter on 26 Jul 2012 at 8:22

GoogleCodeExporter commented 9 years ago
Shouldn't this (function names) reside in some sort of object inspector? When 
debugging I normally expect to view the values of variables. I find the 
presence of member functions clutters this part of the UI.

Original comment by haslett....@gmail.com on 26 Jul 2012 at 4:44

GoogleCodeExporter commented 9 years ago
In Python everything is an object, functions, numbers etc.  There is no clear 
distinction between methods and properties.

Original comment by pyscripter on 26 Jul 2012 at 6:33

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I think that perhaps this should be rephrased as an Improvement.

Looking at the variables window I have open at present there are a number of 
entries marked as instancemethod, method-wrapper and 
builtin_function_or_method. It seems then that it is possible to discriminate 
between different kinds of entity within the Variables window. 

That being the case I think it would be helpful to offer the user the option to 
filter out those Types as he sees fit. 

Original comment by haslett....@gmail.com on 27 Jul 2012 at 5:20