Allow defining default generator's first sequence#91
Allow defining default generator's first sequence#91Lynesth wants to merge 5 commits intopython-smpplib:masterfrom
Conversation
If you're up to, otherwise just merge it as is |
|
@eigenein Something like this ? |
eigenein
left a comment
There was a problem hiding this comment.
Yep, I think TypeError and ValueError is a good enough choice 👍
|
Please, add/update requirements for custom sequence generator to README as potentially breaking changes |
|
@podshumok I understand the part about adding information about it on the README but why are you mentionning breaking changes ? |
|
I take that back, I thought you create other implementation instance if it is passed |
|
confusing part is that |
|
So I think we don't need this argument in |
|
I'm okay with either option. One seems less DRY, another is more friendly |
|
I vote for |
|
@podshumok @eigenein Made some changes, let me know if that's ok now. |
| import mymodule | ||
|
|
||
| generator = mymodule.PersistentSequenceGenerator() | ||
| generator = mymodule.MyAwesomeSequenceGenerator() |
There was a problem hiding this comment.
Please elaborate a little about the interface such a Generator has to have
There was a problem hiding this comment.
If you don't have time for this, also please let us know and @eigenein will merge it as is.
There was a problem hiding this comment.
@podshumok @eigenein Feel free to add this info to the readme if you wish, I don't think I will have time to.
That way anyone can easily implement a "persistent" generator without having to create a new class.
Feel free to comment whatever you think about it.
Should I add some checks to make sure it is a int that is in the valid range
0x00000000-0x7FFFFFFF?