Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert to Python3 #5

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
can pass bytes or str
timbl committed Jan 10, 2024
commit 86b33dcbd3bfe49d3ae4a766b8d46ed7a7993ce7
5 changes: 4 additions & 1 deletion notation3.py
Original file line number Diff line number Diff line change
@@ -212,7 +212,10 @@ def feed(self, octets):
So if there is more data to feed to the
parser, it should be straightforward to recover."""

str = octets # .decode('utf-8')
if isinstance(octets, bytes):
str = octets.decode('utf-8')
else:
str = str = octets
i = 0
while i >= 0:
j = self.skipSpace(str, i)