3

I am writing a Python package that provides a parser for, say, .xyz files. I am aware of PEP8, PEP423, and other questions here and there.

I am hesitating in naming my package xyzparse or xyzparser.

In other word, is it better to name a Python package as a noun or as a verb?

ebosi
  • 1,285
  • 5
  • 17
  • 37

1 Answers1

3

I would use verbs as in argparse, astunparse and bisect. You certainly will find the other opinion, but this makes more sense; you will then define submodules carrying the noun names (e.g. argparse.ArgumentParser).

I think there are examples where nouns fit better. I don't think there is a convention for this anyway except that people with ocd like me find it difficult not to find a standard for everything :).

zaibaq
  • 120
  • 6