You are right: what you are attempting is contrary to Python’s structure and its culture.
Document your API, and educate your users how to use it. It’s their program, so if they still want to override your function, who are you to prevent them?
More Related Contents:
- How to sum all range output in python 3
- How to map dict into another dict Python
- ImportError: Cannot import name X
- Matplotlib different size subplots
- join list of lists in python [duplicate]
- Can pandas automatically read dates from a CSV file?
- Pandas cannot open an Excel (.xlsx) file
- How to determine the length of lists in a pandas dataframe column
- Pandas fill missing values in dataframe from another dataframe
- What is the time complexity of popping elements from list in Python?
- How can I generate a list of consecutive numbers?
- Why compile Python code?
- Splitting a string with repeated characters into a list
- SQLAlchemy, get object not bound to a Session
- How to sort OrderedDict of OrderedDict?
- Slicing a numpy array along a dynamically specified axis
- How can you get the call tree with Python profilers?
- How to get status code by using selenium.py (python code)
- Django DateField default options
- Python selenium: wait until element is clickable – not working
- “TypeError: method() takes 1 positional argument but 2 were given” but I did only pass one
- How to stop the input function from inserting a new line?
- Grep and Python
- Changing one dict changes all dicts in a list of dicts [duplicate]
- How to start threads at the same time in Python [duplicate]
- Regexp to remove specific number of occurrences of character only
- QuerySet, Object has no attribute id – Django
- Region of Interest opencv python
- json.decoder.JSONDecodeError: Extra data: line 2 column 1 (char 190) [duplicate]
- How can I constrain a value parsed with argparse (for example, restrict an integer to positive values)?