Replies: 2 comments 1 reply
|
This is all about convention in examples, not what the language supports (which just mirrors python), right? |
1 reply
|
I don't love that my immediate preference is guppylang.std.modifiers (which is probably too small in scope) and I defer to wiser folks |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Currently guppy examples import all quantuim functions at the top of the python module. Something like the following excerpt from the adaptive qpe example:
Having to go back and import so many things from one place is not nice because:
It is for these kinds of reasons that many python libraries with a large range of top level functions and types use the import abbreviation convention:
I propose we adopt/promote this in guppy, but focussed on the standard library. You should also be able to conveniently import built-ins (ones that don't clash with python built-ins) without having to import them one by one. This relates to #430. So rewriting the example above:
(Sneaky bonus: #640)
All reactions