Having fun with packages Since i don't master packaging completely thought there was a __repr__.py protocol nearby! Might be useful maybe to replace it by a help message
Kind Regards, Abdur-Rahmaan Janhangeer compileralchemy.com <https://www.compileralchemy.com> | github <https://github.com/Abdur-rahmaanJ/> Mauritius On Thu, Apr 2, 2020 at 12:41 AM Chris Angelico <ros...@gmail.com> wrote: > On Thu, Apr 2, 2020 at 7:37 AM Rhodri James <rho...@kynesim.co.uk> wrote: > > > > On 01/04/2020 21:22, Abdur-Rahmaan Janhangeer wrote: > > > Greetings list, > > > > > > I have a custom package. > > > > > >>>> import package > > >>>> package > > > <module 'package' from '<path>'> > > > > > > what do i have to modify from my package to have like > > > > > >>>> package > > > Hi! > > > > Do you mean "How do I override the str() or repr() of a module"? I > > don't think you can. > > > > Not easily. It is possible but only by replacing the module as you're > importing it. > > Also, I'm not sure why you would even need/want to do this - Abdur, > can you elaborate on the use-case here? > > ChrisA > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list