avrae / draconic

The Draconic language: a scripting language based off Python to run user scripts on the server safely.
MIT License
18 stars 9 forks source link

fix(types): safer immut types & iter handling #30

Closed LazyDope closed 1 year ago

LazyDope commented 1 year ago

Summary

Fixes immutable types being unusable when in iterables because they were getting size checked, and also made sure to not skip size checks on iterables if a TypeError is raised while checking the size of the contents, instead only the iter(obj) line is checked by the try-except, using an else instead.

Checklist

PR Type