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 173320 - syntax error not detected for "if cond" without colon
Summary: syntax error not detected for "if cond" without colon
Status: RESOLVED FIXED
Alias: None
Product: python
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Torbjorn Norbye
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-29 21:50 UTC by nbphpuser
Modified: 2009-10-02 21:21 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 nbphpuser 2009-09-29 21:50:12 UTC
Hi,

def myFunc(p):
    if p
        pass
    else:
        pass

after "if p" should be colon, editor does not recognize it as syntax error
Comment 1 cdimauro 2009-10-02 09:24:50 UTC
It's a general problem which applies to suits:

def myFunc(p):
    if p:
        pass
    else
        pass

def myFunc(p):
    try
        p
    except
        pass

No one signals a Syntax Error.

Its a serious issue for me
Comment 2 Torbjorn Norbye 2009-10-02 20:59:29 UTC
I don't think you meant to make this a "P5" -- P5 are least important. P1 are used for showstoppers (crashes tool) - P5
are for purely cosmetic minor issues.
Comment 3 Torbjorn Norbye 2009-10-02 21:06:20 UTC
Fixed in changeset bf35c4c75516.
Comment 4 Torbjorn Norbye 2009-10-02 21:21:36 UTC
Fix will be included in Python IDE build #2723 and later from http://deadlock.netbeans.org/hudson/job/python/
and complete IDE build #6721 and later from http://deadlock.netbeans.org/hudson/job/trunk/