Skip to content

Commit

Permalink
Explain why api_main() isn't generally recommended
Browse files Browse the repository at this point in the history
  • Loading branch information
mara004 committed Jan 23, 2025
1 parent b01c1bc commit 72e8cd8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/ctypesgen/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def postparse(args):

# Not officially supported. Use at own risk.
# API callers should prefer to go through argparse-based main() where possible.
# Part of the reason why this isn't recommended is that no type-checking or conversion is being done; you have to make sure on your own that you pass in the expected types. In particular, when you pass a string where a list of strings is expetced, you may get the maddest exceptions (because a string is also iterable).

def api_main(args):

Expand Down

0 comments on commit 72e8cd8

Please sign in to comment.