#25 Handling of Python import

closed
Andre-Littoz
5
2012-08-03
2009-06-18
David
No

It would be nice if Python import statements were handled similar to C #includes, where the file links to the included file. It appears that currently, certain imported modules will link to a keyword search and others will be unlinked.

Syntax for the import statement can be found here: http://docs.python.org/reference/simple_stmts.html#the-import-statement

Discussion

<< < 1 2 (Page 2 of 2)
  • David
    David
    2011-04-11

    Just gave 0.9.9 a try; got an error when I tried to update the index:

    Sequence (?|...) not recognized in regex; marked by <-- HERE in m/^ # reminder: no initial space in the grammar
    ([\w\#]\s*[\w]*) # reserved keyword for include construct
    (\s+) # space
    (?| <-- HERE (")(.+?)(") # C syntax
    | (\0<)(.+?)(\0>) # C alternate syntax
    | ()([\w:]+)(\b) # Perl and others
    )
    / at lib/LXR/Lang.pm line 88.
    Compilation failed in require at lib/LXR/Common.pm line 50.
    Compilation failed in require at lib/LXR/Index.pm line 23.
    BEGIN failed--compilation aborted at lib/LXR/Index.pm line 23.
    Compilation failed in require at /var/www/html/lxr/genxref line 26.
    BEGIN failed--compilation aborted at /var/www/html/lxr/genxref line 26.

     
  • Andre-Littoz
    Andre-Littoz
    2011-04-12

    This incompatibility has been discovered last week (2011-04-05) by Dr. Martin Wilck.

    A new feature has been added in Perl after version 5.8.8 (which is probably yours). Mine is 5.12.3 and contains this feature.

    Your choice is:
    1/ upgrade Perl, or
    2/ read Help forum, topic Help on non-regression checks after modifications; towards the end, you'll find a dirty patch to get around this incompatibility.

    Please send feedback. If you think it worth, I can try to use alternate syntax since this part of the code is not fully satisfactory.

    Regards

     
  • Andre-Littoz
    Andre-Littoz
    2012-08-03

    • status: open --> closed
     
  • Andre-Littoz
    Andre-Littoz
    2012-08-03

    Ships with release 1.0

     
<< < 1 2 (Page 2 of 2)