Skip to content

Commit 2185f27

Browse files
authored
Moderinze README code
1 parent d8e9dc5 commit 2185f27

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ Example usage
9090
import can
9191
9292
# create a bus instance
93-
# many other interfaces are supported as well (see below)
93+
# many other interfaces are supported as well (see documentation)
9494
bus = can.Bus(interface='socketcan',
9595
channel='vcan0',
9696
receive_own_messages=True)
@@ -102,7 +102,7 @@ Example usage
102102
103103
# iterate over received messages
104104
for msg in bus:
105-
print("{:X}: {}".format(msg.arbitration_id, msg.data))
105+
print(f"{msg.arbitration_id:X}: {msg.data}")
106106
107107
# or use an asynchronous notifier
108108
notifier = can.Notifier(bus, [can.Logger("recorded.log"), can.Printer()])

0 commit comments

Comments
 (0)