Func – –

March 9, 2009


Currently working on Func 0.24-1, I found that comment and following Python codes in the /usr/lib/python2.5/site-packages/func/ at Line =~ 100 on Fedora 10

# FIXME: this is probably more complicated than it needs to be -akl
# aka, everything after the module_file_path

if basename[:8] == “__init__”:
modname = dirname
dirname = “”
elif basename[-3:] == “.py”:
modname = basename[:-3]
elif basename[-4:] in [“.pyc”, “.pyo”]:
modname = basename[:-4]

which could be remplaced by :

modname = dirname
dirname = “”
if basename[:8] != “__init__”:
mymodname =basename.split(‘.’)

Well, do not have the pretension to be better coder than Python developper however if I can help.


3 Responses to “Func – –”

  1. mpdehaan said

    That’s not functionally the same. Now you will pick up more than Python files, which will break the module loader when other content lives in that directory.

    • Frederic Hornain said

      Dear Micheal,

      Ok, I am going to review that part of code.
      Thanks for your feed back.
      Just to let you know my intention was not to be arrogant.
      Thanks for your comprehension.


  2. Not a problem at all… glad to see the interest.

    FYI — If you’re curious about the FIXME, I’d ask on the mailing list rather than Fedora Planet … that’s how such Q&A usually works.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: