[sugar] [PATCH] sugar pylint (vol2)

Martin Dengler martin at martindengler.com
Tue Apr 22 09:20:12 EDT 2008


On Tue, Apr 22, 2008 at 02:47:38PM +0200, Simon Schampijer wrote:
> Another issue I have quite often is the one of unused variables due 
> to returned tuples and lists where not all the variables are used in 
> the code.
> 
> examaple from src/view/frame/clipboardpanelwindow.py:
> 
> scheme, netloc, path, parameters, query, fragment = 
> urlparse.urlparse(uri)
> 
> on_disk = (scheme == 'file')
> 
> What about doing here, or any other options?
> scheme = urlparse.urlparse(uri)[0]

IMHO, pylint shouldn't warn about these situations.  The code it's
complaining about is a lot nicer than the "pylint approved"
alternative you mention.

> Best,
>    Simon

Martin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.laptop.org/pipermail/sugar/attachments/20080422/29919b95/attachment.pgp 


More information about the Sugar mailing list