Skip to content

You have to use * notation when importing egglog "from egglog import *"  #210

@shinawy

Description

@shinawy

A better practice for using multiple packages is not to import packages using * notation to be aware which identifier belongs to which package. However even I am using this concept, I have to use * notation while working with egglog because some types are not defined.

import egglog as el 
# from egglog import * 

class Num(el.Expr):
    def __init__(self, value: el.i64Like) -> None:
        ...

nv: Num = Num(1)  # gets an error "NameError: name 'i64' is not defined"

from egglog import * 
nv: Num = Num(1)  # No errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions