fastai / fastcore

Python supercharged for the fastai library
http://fastcore.fast.ai
Apache License 2.0
954 stars 274 forks source link

[Onboarding Experience] Explained how to import fastcore #541

Closed UmerHA closed 4 months ago

UmerHA commented 7 months ago

Hi all,

I found using fastcore a bit tedious because it wasn't clear to me how to import it correctly. I now understand that from fastcore.all import * or from fastcore.SUBMODULE import * is correct.

This PR adds a 1-line-explainer in the Getting Started section of the docs.

As far as I can tell this is not explained anywhere in the docs yet. This would have saved me a lot of time. :)

review-notebook-app[bot] commented 7 months ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

jph00 commented 4 months ago

This isn't quite correct @UmerHA . Whilst you can import all symbols with a wildcard import (and fastcore is designed to support that well), many people prefer to instead use a module prefix instead, or just import a subset of symbols. This is a python-level issue, not specific to fastcore.