<commit_before>\section{\module{weakref} ---
         Weak references}

\declaremodule{extension}{weakref}
\modulesynopsis{Support for weak references and weak dictionaries.}
\moduleauthor{<NAME>, Jr.}{<EMAIL>}
\moduleauthor{<NAME>}{<EMAIL>}
\moduleauthor{<NAME>}{<EMAIL>}
\sectionauthor{<NAME>, Jr.}{<EMAIL>}

\versionadded{2.1}


The \module{weakref} module allows the Python programmer to create
\dfn{weak references} to objects.

XXX --- need to say more here!

Not all objects can be weakly referenced; those objects which do
include class instances, functions written in Python (but not in C),
and methods (both bound and unbound).  Extension types can easily
be made to support weak references; see section \ref{weakref-extension},
``Weak References in Extension Types,'' for more information.


\begin{funcdesc}{ref}{object\optional{, callback}}
  Return a weak reference to \var{object}.  If \var{callback} is
  provided, it will be called when the object is about to be<commit_msg>Correct a markup error for an accented character.<commit_after>\section{\module{weakref} ---
         Weak references}

\declaremodule{extension}{weakref}
\modulesynopsis{Support for weak references and weak dictionaries.}
\moduleauthor{<NAME>, Jr.}{<EMAIL>}
\moduleauthor{<NAME>}{<EMAIL>}
\moduleauthor{<NAME>}{<EMAIL>}
\sectionauthor{<NAME>, Jr.}{<EMAIL>}

\versionadded{2.1}


The \module{weakref} module allows the Python programmer to create
\dfn{weak references} to objects.

XXX --- need to say more here!

Not all objects can be weakly referenced; those objects which do
include class instances, functions written in Python (but not in C),
and methods (both bound and unbound).  Extension types can easily
be made to support weak references; see section \ref{weakref-extension},
``Weak References in Extension Types,'' for more information.


\begin{funcdesc}{ref}{object\optional{, callback}}
  Return a weak reference to \var{object}.  If \var{callback} is
  provided, it will be called when the object is about to be
{'fraction_non_alphanumeric': 0.11446977205153618, 'fraction_numerical': 0.0019821605550049554, 'mean_word_length': 4.991097922848665, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4763438', 'n_tokens_mistral': 595, 'n_tokens_neox': 570, 'n_words': 224}