[wingide-users] undetermine type

Marcus Low marcus at internetnowasp.net
Fri Jul 4 02:33:03 MDT 2008


 listrcpt = rcptto[:]

This is valid list copy. The statement "assert(isinstance(rcptto, 
list))" is only added there to HELP wing-ide to recognize that rcptto is 
a list. Else i wont be bother putting it.
Now if wing-ide recognize now that rcptto is a LIST then my next 
statement "listrcpt = rcptto[:]"  should be recognize as well.
If i am not using listrcpt as a list here, i dont know what other 
possible use you are talking about given just those codes.

>By the way this code breaks if rcptto is not a list but something with
>licing support.

I already said the "assert" is for the sake of the IDE and the user of this function gurantees its a list. I hope you are in the right forum.



Lawrence Oluyede wrote:
> On Fri, Jul 4, 2008 at 9:56 AM, Marcus Low <marcus at internetnowasp.net> wrote:
>   
>> def hello (rcptto) :
>>   assert(isinstance(rcptto, list))             listrcpt = rcptto[:]
>> The listrcpt is also marked as undetermine type in the sample above. The ide
>> needs to detect this kind of usage.
>>
>>     
>
> How it should? Asserting something is a istance of list doesn't mean
> that in the line below you will use the variable as one.
> By the way this code breaks if rcptto is not a list but something with
> slicing support.
>
>   




More information about the wingide-users mailing list