Skip to content
This repository was archived by the owner on Jan 10, 2023. It is now read-only.
This repository was archived by the owner on Jan 10, 2023. It is now read-only.

saved_net = Net() ^ R() ^ Net() on one line #25

Open
@amstan

Description

@amstan

Sometimes one wants to write something like this near an MCU:

saved_net_variable = Net("MORE_HERE") ^ R("100") ^ Net("NEARBY_PIN") << mcu.PIN

The idea is that saved_net_variable(aka Net("MORE_HERE")) is used in other places in the circuit later on.

The problem is that the ^ operator makes the expression lose the reference to Net("MORE_HERE")`

Then in needs to be rewritten in separate lines:

saved_net_variable = Net("MORE_HERE")
saved_net_variable ^ R("100") ^ Net("NEARBY_PIN") << mcu.PIN

But that's kind of ugly, and both me and Jim don't like it (especially if there's many of them).

The to= argument could have done this on one line, but it's even uglier:

saved_net_variable = Net("MORE_HERE") << R("100", to=(Net("NEARBY_PIN") << mcu.PIN))

Here's a bug to dump thoughts about improving this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestNew feature, request or enhancementhelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions