question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Laziness feature request: `from particle import literals`

See original GitHub issue

Literals are great and I want to use them a lot!

Currently, I need to import literals like this from particle.particle import literals as lp For the end user it is not obvious why one has to type the middle particle, so this is a bit confusing (I think I understand why you organised it like this, but just saying).

It would be a great convenience if I could just import my literals like this from particle import literals as lp

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
HDembinskicommented, Apr 17, 2020

Great, if I could I would give another star.

1reaction
eduardo-rodriguescommented, Apr 7, 2020

Right, we could keep from particle.pdgid import literals as lid for PDGID literals and make the particle literals available from the top-level import? That’s doable.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular2 lazy loading module error 'cannot find module'
Finally I found out that I need to import lazy loaded module in routing config this way: const routes: Routes = [ {...
Read more >
The return of lazy imports for Python - LWN.net
The aim of this feature is to make imports transparently lazy. "Lazy" means that the import of a module (execution of the module...
Read more >
XML Schema Part 1: Structures Second Edition - W3C
A particle is a term in the grammar for element content, consisting of either an element declaration, a wildcard or a model group,...
Read more >
scikit-hep/awkward-0.x: Manipulate arrays of complex ... - GitHub
Awkward's VirtualArray calls its generator function to materialize an array when needed, and a ChunkedArray of VirtualArrays is a classic lazy-loading array, ...
Read more >
Read A Lisp Programmer Living in Python-Land - Leanpub
I will require (or import) the contributed let macro, that substitutes for a ... One of the great Clojure features is support of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found