Page 1 of 1

Class/Method level doc strings are failing

PostPosted: Wed Feb 13, 2008 10:16 am
by AlGonzalez
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'

Re: Class/Method level doc strings are failing

PostPosted: Wed Feb 13, 2008 10:47 am
by khjklujn
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.

Re: Class/Method level doc strings are failing

PostPosted: Wed Feb 13, 2008 11:03 am
by AlGonzalez
Thanks. You are correct, works with tabs but now with spaces - Minor Bug

Re: Class/Method level doc strings are failing

PostPosted: Thu Feb 14, 2008 1:52 am
by Charles
I'll add a new test case for this and fix it.