This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 155586 - 'del' keyword should count as a usage
Summary: 'del' keyword should count as a usage
Status: VERIFIED FIXED
Alias: None
Product: python
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Torbjorn Norbye
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-16 17:17 UTC by Jesse Glick
Modified: 2009-02-19 22:58 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2008-12-16 17:17:00 UTC
lck = self.lock_somehow()
try:
    do_some_atomic_stuff()
finally:
    del lck

incorrectly marks 'lck' as unused. In fact its destructor does something useful.
Comment 1 Torbjorn Norbye 2008-12-16 17:59:15 UTC
Fixed in changeset c57d5d16f082.  The symbol table visitor needed to override visitDelete() as well to mark symbols read.
Comment 2 Peter Lam 2009-01-10 05:26:31 UTC
verified in build 20090110-b562.