Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Clean up base matplotlib namespace #2052

Open
Labels
@efiring

Description

@efiring
importmatplotlibprint"\n".join(dir(matplotlib))

yields

RcParamsVerbose__builtins____doc____file____name____package____path____version____version__numpy___create_tmp_config_dir_deprecated_ignore_map_deprecated_map_get_configdir_get_data_path_get_data_path_cached_get_home_havedate_is_writable_dir_python24_required_use_error_msgasciibyte2strcbookcheckdep_dvipngcheckdep_ghostscriptcheckdep_inkscapecheckdep_pdftopscheckdep_ps_distillercheckdep_texcheckdep_usetexcheckdep_xmllintcolorscompare_versionscompatconverterdateutildefaultdefaultParamsdefault_test_modulesdistutilsexpected_versionfontconfig_patternfound_versionget_backendget_configdirget_data_pathget_example_dataget_homeget_py2exe_datafilesinteractiveis_interactiveis_string_likekeymajormatplotlib_fnameminor1minor2numpyosprint_functionpyparsingrcrcParamsrcParamsDefaultrcParamsOrigrc_contextrc_filerc_file_defaultsrc_paramsrc_params_from_filercdefaultsrcsetupresshutilsubprocesssystempfiletesttk_window_focustmpusevalidate_backendvalidate_toolbarverbosewarningsx

This is a mess; from the user's standpoint there are some useful things in there, but they are hard to identify among all the detritus from the startup process. And then there is the bewildering rc conglomeration. Maybe that should be treated separately.

I'm not sure whether cleaning this up requires one or more MEPs, but it probably does require some strategic thinking, so I am starting this with a MEP tag.

As a first shot, maybe all that is required is a bunch ofdel commands sprinkled throughoutinit.py. Or, every variable and module that needs to be deleted could be given a unique prefix, or added to a list, and then all could be deleted at the end.

Alternatively, leading underscores could be used aggressively so that at least when using ipython tab completion, only names that are intended to be part of the public API would appear.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp