Pythonic way to implement a tokenizer

前端 未结 12 741
青春惊慌失措
青春惊慌失措 2020-12-30 07:11

I\'m going to implement a tokenizer in Python and I was wondering if you could offer some style advice?

I\'ve implemented a tokenizer before in C and in Java so I\'m

12条回答
  •  北荒
    北荒 (楼主)
    2020-12-30 07:29

    Python takes a "we're all consenting adults" approach to information hiding. It's OK to use variables as though they were constants, and trust that users of your code won't do something stupid.

提交回复
热议问题