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

Fix typo error and calculated value #2

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

diegomvh
Copy link

@diegomvh diegomvh commented Feb 9, 2012

Hi,
We using ponyguruma for a project hosted here in github.
The errors commited in this request was solved in the d3f0's repository of your project.
This commit fix two errors in _highlevel.py file:

First error:

import ponyguruma
pattern = ponyguruma.Regexp("\s+")
pattern.split("Hello World")


NameError Traceback (most recent call last)
/mnt/datos/workspace/GitHub/ponyguruma/build/lib.linux-i686-2.7/ in ()
----> 1 pattern.split("Hello World")

/mnt/datos/workspace/GitHub/ponyguruma/build/lib.linux-i686-2.7/ponyguruma/_highlevel.py in split(self, string, maxsplit, pos, endpos, flat)
179 startstring = string[:pos]
180 n = 0
--> 181 push_match = (flag and result.append or result.extend)
182 while 1:
183 state = regexp_match(self, string, pos, endpos, False)

NameError: global name 'flag' is not defined

Second error:

from ponyguruma import sre
pattern = sre.compile("(\w+)")
match = pattern.match("Hello World")
type(match.groups)
instancemethod
match.groups
<bound method SRE_Match.groups of <ponygurma.sre.SRE_Match object at 0x860ea6c>>
match.groups()
('Hello',)

match.groups()

TypeError Traceback (most recent call last)
/mnt/datos/workspace/GitHub/ponyguruma/build/lib.linux-i686-2.7/ in ()
----> 1 match.groups()
match.groups
('Hello',)
type(match.groups)
tuple

Copy link

@jayvdb jayvdb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good changes, especially the Python 3 support

@jayvdb
Copy link

jayvdb commented Jul 24, 2019

If you want to retain Python 2 support, that should be fairly easy to do.

@jayvdb
Copy link

jayvdb commented Jul 24, 2019

I see https://github.com/prymatex/ponyguruma has this.

But nobody is claiming and publishing to

https://pypi.org/project/ponyguruma/

;-(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants