Skip to content

Conversation

@kiranandcode
Copy link
Contributor

Closes #516

Copy link
Contributor

@eb8680 eb8680 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this separate from Encodable? I thought it was supposed to be a method or Operation attached to Encodable and take a context argument?:

class Encodable[T](EncodableAs[T, type]):
  ...
  @Operation.define  # or only define an `Operation` for specific `Encodable` subtypes?
  @classmethod
  def encoding_instructions(cls, env: Mapping[str, Any]) -> Sequence[str]: ...

@kiranandcode
Copy link
Contributor Author

Maybe a miscommunication? I thought @jfeser last suggestion was to replace the method with a standalone type directed function, alongside making it lexically sensitive

If thats not necessary then I'll update the PR to just make it a defop and add lexical context as a parameter

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

encoding_instructions should take lexical context

3 participants