Update to work with Python 3/Sublime Text 3 #6

Merged
merged 1 commit into from Jun 2, 2013

Conversation

Projects
None yet
3 participants
@JohnArcher
Contributor

JohnArcher commented May 22, 2013

Updates the file for Python 3, so it runs with Sublime Text 3.

Not sure whether there is a better way than explicitly converting all_before and all_after to lists ...!? But that works.

Update for Python 3 syntax
Updates the file for Python 3, so it runs with Sublime Text 3.

Not sure whether there is a better way than explicitly converting all_before and all_after to lists ...!? But that works.
@mattfordham

This comment has been minimized.

Show comment Hide comment
@mattfordham

mattfordham May 28, 2013

This worked great for me. Thanks!

This worked great for me. Thanks!

@JohnArcher

This comment has been minimized.

Show comment Hide comment
@JohnArcher

JohnArcher May 28, 2013

Contributor

Great to read! Your welcome!

Contributor

JohnArcher commented May 28, 2013

Great to read! Your welcome!

kek added a commit that referenced this pull request Jun 2, 2013

Merge pull request #6 from JohnArcher/master
Update to work with Python 3/Sublime Text 3.

@kek kek merged commit b555c07 into kek:master Jun 2, 2013

@kek

This comment has been minimized.

Show comment Hide comment
@kek

kek Jun 2, 2013

Owner

Thanks! I had tried to do a conversion of the code to be Python 3-compatible, but not commited it yet. But your way is better. The way I did it was to replace map and filter with loops and indexes because I didn't really understand how they changed those functions. Seems that in Python 3 map/filter return iterators where in Python 2 they just returned lists?

I also commited a small change that seems to make the same code work with Sublime Text 2.

Owner

kek commented Jun 2, 2013

Thanks! I had tried to do a conversion of the code to be Python 3-compatible, but not commited it yet. But your way is better. The way I did it was to replace map and filter with loops and indexes because I didn't really understand how they changed those functions. Seems that in Python 3 map/filter return iterators where in Python 2 they just returned lists?

I also commited a small change that seems to make the same code work with Sublime Text 2.

@JohnArcher

This comment has been minimized.

Show comment Hide comment
@JohnArcher

JohnArcher Jun 3, 2013

Contributor

Thanks, @kek ! Well, yeah, they return iterators. But to be honest, I am no Python dev, I simply googled for the error message that was shown in Sublime console, and did the fix. :-)

Glad that you (hopefully) found a way to support v2 und v3 at the same time. Great!

Contributor

JohnArcher commented Jun 3, 2013

Thanks, @kek ! Well, yeah, they return iterators. But to be honest, I am no Python dev, I simply googled for the error message that was shown in Sublime console, and did the fix. :-)

Glad that you (hopefully) found a way to support v2 und v3 at the same time. Great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment