You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I understand that for performance reasons it makes sense to only import the specific parts of packages that you intend to use. However in my (limited) experience, rich seems to be one of the few packages I've used which does not work with a global import.
Personally I don't care about a ms here or there and I like being more verbose when I call package methods in code (eg. I quite like doing rich.console.Console because I can see easily where it comes from). In scripts where I use rich a lot I often have 3 or 4 imports for other packages followed by about 6 lines of imports just for rich 😅
Is there another reason beyond performance that rich doesn't work with a global import rich statement? Is it something that could be considered in the future?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I understand that for performance reasons it makes sense to only import the specific parts of packages that you intend to use. However in my (limited) experience, rich seems to be one of the few packages I've used which does not work with a global import.
Personally I don't care about a ms here or there and I like being more verbose when I call package methods in code (eg. I quite like doing
rich.console.Console
because I can see easily where it comes from). In scripts where I use rich a lot I often have 3 or 4 imports for other packages followed by about 6 lines of imports just for rich 😅Is there another reason beyond performance that rich doesn't work with a global
import rich
statement? Is it something that could be considered in the future?As always, thank you for the amazing tool 🙏🏻
Phil
Beta Was this translation helpful? Give feedback.
All reactions