Forums

Class/Method level doc strings are failing

General discussion about Cobra. Releases and general news will also be posted here.
Feel free to ask questions or just say "Hello".

Class/Method level doc strings are failing

Postby AlGonzalez » Wed Feb 13, 2008 10:16 am

When I place a doc string after a class or a method definition I get this error: Expecting more doc string contents or the end of the doc string instead of "DEDENT".
Compilation failed - 1 error, 0 warnings


The doc string at the top of the file is accepted without error.

Are doc strings supported at the File, Class, Method, Property levels? If so, is it broken in this release or am I just doing something wrong?

Code: Select all
class Test
    """
    Test class to show doc string issue.
    """
   
    def printTest
        """
        this doc string fails also
        """
       
        print 'Test'
AlGonzalez
 
Posts: 13
Location: Greenville, SC - USA

Re: Class/Method level doc strings are failing

Postby khjklujn » Wed Feb 13, 2008 10:47 am

I can duplicate the error when I use spaces for the indentation. The sample compiles fine when I use tabs instead of spaces, so I think it's probably just an issue with this release.
khjklujn
 
Posts: 29

Re: Class/Method level doc strings are failing

Postby AlGonzalez » Wed Feb 13, 2008 11:03 am

Thanks. You are correct, works with tabs but now with spaces - Minor Bug
AlGonzalez
 
Posts: 13
Location: Greenville, SC - USA

Re: Class/Method level doc strings are failing

Postby Charles » Thu Feb 14, 2008 1:52 am

I'll add a new test case for this and fix it.
Charles
 
Posts: 2515
Location: Los Angeles, CA


Return to Discussion

Who is online

Users browsing this forum: No registered users and 120 guests