Giter Club home page Giter Club logo

Comments (11)

ajalt avatar ajalt commented on September 1, 2024

If you do get it working and submit a pull request, I'll be happy to take a look.

from fuckitpy.

asmeurer avatar asmeurer commented on September 1, 2024

Your "assignment dereference" won't work in Python 3.

from fuckitpy.

admk avatar admk commented on September 1, 2024

@asmeurer What do you mean by "assignment dereference"? I only found this in the original source:

source <- True # Dereference assignment to fix truthiness

Could anyone explain what it means? This bit is syntactically equivalent to source < -True, and subsequently source < -1. Such a comparison in Python 3 will throw a TypeError exception saying str() and int() are unorderable. Because this statement is essentially doing nothing. I simply removed it.

from fuckitpy.

asmeurer avatar asmeurer commented on September 1, 2024

That's the one.

from fuckitpy.

asmeurer avatar asmeurer commented on September 1, 2024

fc7aced

from fuckitpy.

admk avatar admk commented on September 1, 2024

@asmeurer Right... But that still does not explain why it's there. What race condition, and how this would help to fix a race condition?

from fuckitpy.

asmeurer avatar asmeurer commented on September 1, 2024

The whole thing is clearly a joke, as evidenced by the comment. It's just a shame that it will have to be a removed.

from fuckitpy.

asmeurer avatar asmeurer commented on September 1, 2024

You could always dereference the pointer the C way source*=True

from fuckitpy.

ajalt avatar ajalt commented on September 1, 2024

Thanks for all the discussion! Python3 compatibility is finally added in 4dc8167.

As for the discussion on the dereference assignment: I wasn't able to reproduce the race condition it addresses in Python 3, so I made the assignment only on Python 2.

from fuckitpy.

asmeurer avatar asmeurer commented on September 1, 2024

Awesome. Will you do a release on PyPI?

from fuckitpy.

ajalt avatar ajalt commented on September 1, 2024

Done in b7e0ccd. Thanks for the reminder!

from fuckitpy.

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.