Is it possible to copy a module, and then make changes to the copy? To phrase another way, can I inherit from a module, and then override or modify parts of it?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes.
You can use stuff from
moduleor override stuff in your script.You can also do this to create a “derived” module.
Call this “module_2”.
Which imports everything. You can then use stuff from
moduleor override stuff in this new module, “module_2”.Other scripts can then do
And get all the stuff from module modified by the overrides in module_2.