I hereby claim:
- I am sfkleach on github.
- I am sfkleach (https://keybase.io/sfkleach) on keybase.
- I have a public key ASDR0sVvYRYeTlTJ1-7Jv0HWYvpVU98IYRxKe2qP1gVMNAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
{ | |
"$id": "https://github.com/GetPoplog/findhelp.schema.json", | |
"$schema": "https://json-schema.org/draft/2020-12/schema", | |
"title": "FindHelp", | |
"type": "object", | |
"properties": { | |
"popversion": { | |
"description": "A string describing the version of Poplog.", | |
"type": "string" | |
}, |
class Pushable: | |
def __init__(self, iter): | |
self.source = iter | |
self.stored = [] | |
def __iter__(self): | |
return self | |
def __bool__(self): |
from collections import deque | |
PRECEDENCE = { "+": 100, "*": 110 } | |
def precedence( token ): | |
try: | |
return PRECEDENCE[token] | |
except KeyError: | |
return None |
from typing import TypeVar, Generic | |
from collections.abc import Iterable | |
T = TypeVar('T') | |
class Chain(Generic[T]): | |
# Implementation note: the _back field is used to represent different | |
# states of the chain. This implementation technique, borrowed from the | |
# implementation of dynamic lists in Poplog, requires only 2 fields and |