镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

"Bug" in increment/decrement operators #1

Open

Description

@aroberge

First of all, I want to thank you for creating this project and your explanations about it. I found it inspiring. I might try to implement some of your other ideas later.

I like to play with creating extensions to Python's syntax. Instead of using codecs, I prefer to use import hooks.
I've implemented my own version of the increment/decrement operators; you can read about it at https://aroberge.github.io/ideas/docs/html/included/inc_dec.html

When I checked your implementation, I found that spaces were not interpreted correctly; for example, as a result expressions like i+ + would be misinterpreted as i++. I know that you almost certainly did this only for fun and educational purpose but I thought I should flag the issue. I will not be offended if you simply choose to close it as being irrelevant.

Activity

  1. Tsche commented on Sep 20, 2026

    @Tsche
    Owner

    Thanks for reporting this, I'll see if I can address it sometime soon.

    I like the import hook shenanigans you're doing - that's neat. I've been working on a full syntactic macro system for Python using the codec trick (should be in some branch of this repo, but it's due for a proper rewrite). For this I did similar things with import hooks to prevent it from preprocessing included modules repeatedly (and instead cache the preprocessed module and its compilation result).

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions