GithubHelp home page GithubHelp logo

Broken on python 3.8 about pawk HOT 1 CLOSED

MegaBluejay avatar MegaBluejay commented on August 30, 2024
Broken on python 3.8

from pawk.

Comments (1)

SpotlightKid avatar SpotlightKid commented on August 30, 2024 3

This fixes it for me:

diff --git a/pawk.py b/pawk.py
index 7c507ee..33e8675 100644
--- a/pawk.py
+++ b/pawk.py
@@ -53,7 +53,7 @@ def save_last_expression(tree, var_name=RESULT_VAR_NAME):
     body = tree.body
     node = body[-1] if len(body) else None
     body.insert(0, ast.Assign(targets=[ast.Name(id=var_name, ctx=ast.Store())],
-                              value=ast.Name(id="None", ctx=ast.Load())))
+                              value=ast.Constant(None)))
     if node and isinstance(node, ast.Expr):
         body[-1] = ast.copy_location(ast.Assign(
             targets=[ast.Name(id=var_name, ctx=ast.Store())], value=node.value), node)

For explanation see: https://bugs.python.org/issue40870

from pawk.

Related Issues (16)

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.