GithubHelp home page GithubHelp logo

Comments (7)

shenberg avatar shenberg commented on July 21, 2024

empty formatting is used a lot (things like "{}/{}".format(val1, val2) instead of "{0}/{1}".format(...))

I ended up moving to 2.7 but in platforms where 2.6 is the default (like OSX) it's a bit annoying.

from balanced-python.

mahmoudimus avatar mahmoudimus commented on July 21, 2024

Yeah, that's one issue I'm aware of.

from balanced-python.

shenberg avatar shenberg commented on July 21, 2024

The other issue is that since identifiers can't be unicode in Python 2.x, you can't unpack keyword arguments with unicode string keys (in 2.7 this limitation was removed on the unpacking side, but you still can't have unicode identifiers):
def f(a): print a
f({'a':1}) # prints 1
f(
{u'a':1}) # throws TypeError

You're using simplejson for unpacking the json responses, and it always turns strings to unicode (This is done in the Page object for example). A work around would be to create a dict where you call str() on all the keys whenever you're unpacking deserialized json into a function call (I have a version where I implemented this fix locally, but I ended up upgrading to Python 2.7 since that's what heroku provides and my client uses).

Please note that a lot of environments still provide only 2.6 (for example, that's what you get by default on AWS), so I would recommend supporting it.

from balanced-python.

mjallday avatar mjallday commented on July 21, 2024

We've got a python2.6 branch which will solve this. It's on the way.

from balanced-python.

shenberg avatar shenberg commented on July 21, 2024

Thanks!

On Wed, Jul 18, 2012 at 6:44 PM, Marshall Jones <
[email protected]

wrote:

We've got a python2.6 branch which will
solve this. It's on the way.


Reply to this email directly or view it on GitHub:
#1 (comment)

from balanced-python.

mjallday avatar mjallday commented on July 21, 2024

Do we want to merge this into master? The differences are just string formatting and losing some of the nice helpers that we get in the 2.7 test library.

Failing to do so requires us to keep 2 separate branches up to date.

from balanced-python.

mjallday avatar mjallday commented on July 21, 2024

FIXED!

from balanced-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.