Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
86cbc3f1
Commit
86cbc3f1
authored
Jun 10, 1999
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Relocating file to Lib/lib-old.
parent
220d1e25
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
25 deletions
+0
-25
Lib/util.py
Lib/util.py
+0
-25
No files found.
Lib/util.py
deleted
100644 → 0
View file @
220d1e25
# Module 'util' -- some useful functions that don't fit elsewhere
# NB: These are now built-in functions, but this module is provided
# for compatibility. Don't use in new programs unless you need backward
# compatibility (i.e. need to run with old interpreters).
# Remove an item from a list.
# No complaints if it isn't in the list at all.
# If it occurs more than once, remove the first occurrence.
#
def
remove
(
item
,
list
):
if
item
in
list
:
list
.
remove
(
item
)
# Return a string containing a file's contents.
#
def
readfile
(
fn
):
return
readopenfile
(
open
(
fn
,
'r'
))
# Read an open file until EOF.
#
def
readopenfile
(
fp
):
return
fp
.
read
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment