Skip to content

Commit 02422bc

Browse files
committed
Further code elaboration
1 parent 9fea73d commit 02422bc

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

behavioral/command.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
3-
3+
from __future__ import print_function
44
import os
55
from os.path import lexists
66

@@ -18,7 +18,7 @@ def undo(self):
1818
self.rename(self.dest, self.src)
1919

2020
def rename(self, src, dest):
21-
print('renaming {} to {}'.format(src, dest))
21+
print(u"renaming %s to %s" % (src, dest))
2222
os.rename(src, dest)
2323

2424

behavioral/state.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ def scan(self):
1515
self.pos += 1
1616
if self.pos == len(self.stations):
1717
self.pos = 0
18-
print(u"Scanning... Station is", self.stations[self.pos], self.name)
18+
print(u"Scanning... Station is %s %s" %
19+
(self.stations[self.pos], self.name))
1920

2021

2122
class AmState(State):

0 commit comments

Comments
 (0)