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.

Documentation shows private functions

See original GitHub issue

The documentation lists some functions that are not available outside the submodule they are defined in. All of the usage examples use:

import humanize

humanize.…

but this does not allow access to these methods.

These functions should be exported to the parent module.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
hugovkcommented, Sep 24, 2021

Thanks for the PR!

I wonder if we should instead deprecate these (emit DeprecationWarnings) and make them private in the next major release?

(For example, rename gettext to _gettext, call _gettext internally, and have a new gettext that emits the warning and calls _gettext.)

The functions in question:

i18n: gettext and ngettext.

time: abs_timedelta, date_and_delta, Unit

These are all pretty much intended for internal use, that’s probably why they weren’t made fully public.

0reactions
hugovkcommented, Oct 14, 2021

Yes, this is what I had in mind, thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Should I document my private methods? - Stack Overflow
Yes, it is necessary to document your private methods. It becomes increasingly necessary as more developers are using your code ...
Read more >
Documenting private methods. - Google Groups
Private functions are meant to be implementation details. You can't even call them directly. Documentation are for folks that want to use your ......
Read more >
Private Functions - MATLAB & Simulink - MathWorks
This topic explains the term private function, and shows how to create and use private functions. Private functions are useful when you want...
Read more >
Is it necessary to warn about the @doc attribute for a private ...
Private functions do not have descriptions to display in programming tools when suggesting or looking up docs of a function, since they do...
Read more >
Writing Documentation – Elixir v1.5.0 - HexDocs
Documenting Private Functions ​​ Elixir warns if a private function has a @doc attribute and discards its content, because @doc is intended to...
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