[wingide-users] source completion
Doran_Dermot@emc.com
Doran_Dermot at emc.com
Fri Sep 9 10:15:27 EDT 2005
Hi Russell,
The built-in "len" is what I believe you are looking for.
E.g.
>>> str = "where is that command anyway"
>>> len(str)
28
>>> animals = ["cat", "dog", "mouse"]
>>> len(animals)
3
>>>
Cheers!!
Dermot Doran
EMC2 GTS Solutions Level 2
Office: +31-20-7768439
Mobile: +31-6-55815258
-----Original Message-----
From: wingide-users-bounces at wingware.com
[mailto:wingide-users-bounces at wingware.com] On Behalf Of Russell Warren
Sent: 09 September 2005 16:08
To: wingide-users at wingware.com
Subject: Re: [wingide-users] source completion
Tangent question from a relative Python newbie not yet familiar with the
zillion available Python libraries...
Does Python not have a sizeof-like function to do what you are doing with
that getsizefromtype routine? It seems painful/strange that you must write
that function.
-----Original Message-----
From: wingide-users-bounces at wingware.com
[mailto:wingide-users-bounces at wingware.com]On Behalf Of Wingware Support
Sent: Friday, September 09, 2005 10:00 AM
To: Dave Aitel
Cc: wingide-users at wingware.com
Subject: Re: [wingide-users] source completion
On Fri, 9 Sep 2005, Dave Aitel wrote:
> I use the source completion a lot, but what mystifies me is why when I'm
> doing something like this:
> def getsizefromtype(basetype):
> "int is 4, etc"
> if basetype in [FC_BYTE,FC_CHAR]:
> return 1
> elif base <--- here it shows me something random first, not
"basetype".
>
> Should it be doing a "most recently used" search of some kind?
It should be going alphabetically and selecting the first match
alphabetically, not randomly. However, augmenting that by selecting
most recently used match, if any, is a good suggestion. I've added it
as a feature request.
- Stephan
_________________________________________________
Wing IDE users list
http://wingware.com/lists/wingide
_________________________________________________
Wing IDE users list
http://wingware.com/lists/wingide
More information about the wingide-users
mailing list