# PyTEAL: Increment slot value in a Seq expression

**URL:** <https://forum.algorand.co/t/pyteal-increment-slot-value-in-a-seq-expression/4864>\
**Category:** Uncategorized\
**Created:** [October 25, 2021, 5:37pm UTC](https://forum.algorand.co/t/pyteal-increment-slot-value-in-a-seq-expression/4864 "2021-10-25T17:37:38Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![jasonpaulos](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.algorand.co/jasonpaulos/32/617_2.png) [@jasonpaulos](https://forum.algorand.co/u/jasonpaulos)\
**Post date:** [October 28, 2021, 6:05pm UTC](https://forum.algorand.co/t/pyteal-increment-slot-value-in-a-seq-expression/4864/3 "2021-10-28T18:05:14Z")

</div>

I believe this is a different problem from the linked github issue. Right now PyTeal has a strict requirement that a scratch slot cannot be loaded unless it has a value stored in it first, and I believe that’s the problem here.

If you were to add `bitfield.store(Int(0))` somewhere before that section of code is called, it should fix the issue.

Though I recognize this constraint can be a bit annoying, since it’s sometimes useful to rely on the default value of 0 for scratch slots. Let us know if you think this safety check should be somehow made optional or turned into a warning instead.

---

_[View the full topic](https://forum.algorand.co/t/pyteal-increment-slot-value-in-a-seq-expression/4864)._
