-
-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Core\unstack] Deprecate unstack.discard
#1877
base: master
Are you sure you want to change the base?
[Core\unstack] Deprecate unstack.discard
#1877
Conversation
if x.i==1: | ||
if doDiscard: discard stack.pop() | ||
else: discard | ||
discard |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm seriously confused here (perhaps I haven't properly woken up yet, or sth lol):
- why isn't that
push(stack.pop())
?!
P.S. I'm not saying you did anything wrong; I'm just totally baffled by how it already was... you merely eliminated the if doDiscard
clause. I mean... the original point here - I guess - was to return a single element (vs a block of elements) when unstack 1
, but apparently we haven't been returning anything?! 🤔 We'll have to check this to make sure (and not just in the REPL 😉 )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ohh, alright! Sorry for delaying, I didn't noticed this message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ohh, alright! Sorry for delaying, I didn't noticed this message.
No worries! 😉
And also, it's something we have to check... It appears obvious, but is it?
Description
Updates Documentation (with the example of the
discard
function) and deprecates the attribute. Also updates depending parts of the deprecated one, like theconsole.art
.Fixes #1870
Demo
Type of change