0

I want to edit my python interpreter (Python 3.8) so that inverted brackets have a specific meaning.

Different types of (inverted) bracket should automatically create an object of different specific classes which I define.

Examples:

x = )1, 2, 3( should make me an object of type A (some class) with parameters 1, 2, 3.

y = }4, 5, 6{ should make me an object of type B with parameters 4, 5 and 6.

Any ideas how to implement this 'inverse brackets' functionality?

I thought of editing the python interpreter but I need input how to do this exactly.

mkrieger1
  • 19,194
  • 5
  • 54
  • 65
Squareoot
  • 280
  • 1
  • 4
  • 22

0 Answers0