Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Trac #33213: remove mentions of SAGE_TMP from the lazy_string module.
Browse files Browse the repository at this point in the history
  • Loading branch information
orlitzky committed Feb 15, 2022
1 parent 172e9c4 commit 24499f1
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions src/sage/misc/lazy_string.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,7 @@ Based on speaklater: https://github.com/mitsuhiko/speaklater.
A lazy string is an object that behaves almost exactly like a string
but where the value is not computed until needed. To define a lazy
string you specify a function that produces a string together with the
appropriate arguments for that function. Sage uses lazy strings in
:mod:`sage.misc.misc` so that the filenames for SAGE_TMP (which
depends on the pid of the process running Sage) are not computed when
importing the Sage library. This means that when the doctesting code
imports the Sage library and then forks, the variable SAGE_TMP depends
on the new pid rather than the old one.
appropriate arguments for that function.
EXAMPLES::
Expand Down Expand Up @@ -321,12 +316,6 @@ cdef class _LazyString(object):
This is for Python 3 compatibility: see :trac:`24046`, and also
:pep:`519` and
https://docs.python.org/3/library/os.html#os.fspath
Test :trac:`24046`::
sage: from sage.misc.misc import SAGE_TMP
sage: tmp = os.path.join(SAGE_TMP, 'hello')
sage: _ = os.path.exists(tmp)
"""
return str(self)

Expand Down

0 comments on commit 24499f1

Please sign in to comment.