Skip to content

Commit 6c0848b

Browse files
committed
-
1 parent d01322c commit 6c0848b

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

source_py3/python_toolbox/cute_iter_tools.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,12 @@ def __next__(self):
506506
__iter__ = lambda self: self
507507

508508
def push_back(self):
509+
'''
510+
Push the last item back, so it'll come up in the next iteration.
511+
512+
You can't push back twice without iterating, because we only save the
513+
last item and not any previous items.
514+
'''
509515
if self.last_item == _PUSHBACK_SENTINEL:
510516
raise Exception
511517
if self.just_pushed_back:

source_py3/python_toolbox/file_tools.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818
)
1919

2020
def _get_next_path(path):
21-
'''
21+
r'''
2222
Get the name that `path` should be renamed to if taken.
2323
24-
For example, "c:\\example.ogg" would become "c:\\example (1).ogg", while
25-
"c:\\example (1).ogg" would become "c:\\example (2).ogg".
24+
For example, "c:\example.ogg" would become "c:\example (1).ogg", while
25+
"c:\example (1).ogg" would become "c:\example (2).ogg".
2626
2727
(Uses `Path` objects rather than strings.)
2828
'''

0 commit comments

Comments
 (0)