Add zeroing function for arrays#1676
Conversation
6cf59b9 to
5a09d40
Compare
e159288 to
fef941a
Compare
|
Edit: moved discussion back to issue |
|
can you rebase on master? |
@fubuloubu is this because you force pushed to master 😂 ? in the future can we protect master from all pushes except from PRs? |
|
Maybe, that wasn't the commit that was lost though |
5dc0878 to
49ab516
Compare
49ab516 to
e460637
Compare
132cb83 to
a70257f
Compare
|
some work on the gas estimator is still needed |
|
Rebase on master to get updated CI |
ee5f52a to
37c8cbc
Compare
I fixed it. |
fubuloubu
left a comment
There was a problem hiding this comment.
LGTM
Still want to discuss the naming though. I dislike clear
|
Meeting notes: Change to |
|
What would be pythonic is something like |
|
@michwill the later would be the better choice, but we had a very long conversation about this and enabling the Pythonic list comprehension syntax is a rabbit hole, plus |
|
This pull request introduces 3 alerts when merging 47d07b8 into e27fd81 - view on LGTM.com new alerts:
|
|
This pull request introduces 2 alerts when merging 8fdb472 into e27fd81 - view on LGTM.com new alerts:
|
this handles the transformation from None to 0 for base types.
|
This pull request introduces 3 alerts when merging dbb078a into e27fd81 - view on LGTM.com new alerts:
|
dbb078a to
c9f935d
Compare
Codecov Report
@@ Coverage Diff @@
## master #1676 +/- ##
==========================================
+ Coverage 86.55% 86.67% +0.12%
==========================================
Files 55 55
Lines 6343 6335 -8
Branches 1630 1629 -1
==========================================
+ Hits 5490 5491 +1
+ Misses 551 543 -8
+ Partials 302 301 -1
Continue to review full report at Codecov.
|
|
This pull request introduces 1 alert when merging c9f935d into e27fd81 - view on LGTM.com new alerts:
|
| ) | ||
| def empty(expr, context): | ||
| if len(expr.args) != 1: | ||
| raise ParserException('function expects two parameters.', expr) |
There was a problem hiding this comment.
| raise ParserException('function expects two parameters.', expr) | |
| raise ArgumentException('function expects one parameter.', expr) |
There was a problem hiding this comment.
I think ArgumentException is the most fitting exception to raise here. ParserException implies that the code can't be parsed. It also doesn't support annotation.
|
I'm OK merging this with the caveat that users might have some trouble passing empty to and from functions. The compiler will probably just complain. Should be fixed once arg packing / unpacking is refactored. |
| ) | ||
| def empty(expr, context): | ||
| if len(expr.args) != 1: | ||
| raise ParserException('function expects two parameters.', expr) |
There was a problem hiding this comment.
I think ArgumentException is the most fitting exception to raise here. ParserException implies that the code can't be parsed. It also doesn't support annotation.
|
hello, how can I use empty to mimic solidity's looks like vyper.exceptions.CompilerPanic: Unsupported location: None Please create an issue.vyper.exceptions.CompilerPanic: Unsupported location: None Please create an issue. |
|
@or2008 can you do us a favor and create a new issue with the source code that is giving you the problem? Thanks! |
|
sure, opened #2112 |
What I did
How I did it
How to verify it
See tests
Description for the changelog
Cute Animal Picture