Skip to content

Notes on single.py#100

Open
LourensVeen wants to merge 1 commit intoNLeSC:masterfrom
LourensVeen:single-notes
Open

Notes on single.py#100
LourensVeen wants to merge 1 commit intoNLeSC:masterfrom
LourensVeen:single-notes

Conversation

@LourensVeen
Copy link
Member

Some notes on single.py that I can't easily fix myself. See the inline comments.


from cytoolz import identity, pipe
import nltk
import spotlight
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are nltk and spotlight imported globally, and e.g. frog locally? Especially spotlight is only used in one function.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Local imports are lazy. They're used when importing causes work to be performed (e.g. starting a Stanford NER wrapper Java process thingy).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, okay. I thought it was a scoping issue, but you're not dragging anything into another namespace here.

@LourensVeen LourensVeen changed the title Commit for notes on single.py Notes on single.py Mar 30, 2016
larsmans added a commit that referenced this pull request Apr 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants