# Stop argument evaluation

**URL:** <https://forum.inductiveautomation.com/t/stop-argument-evaluation/66871>\
**Category:** Ignition\
**Created:** [November 23, 2022, 7:49pm UTC](https://forum.inductiveautomation.com/t/stop-argument-evaluation/66871 "2022-11-23T19:49:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jonathan](https://avatars.discourse-cdn.com/v4/letter/j/aeb1de/32.png) [@Jonathan](https://forum.inductiveautomation.com/u/Jonathan)\
**Post date:** [November 23, 2022, 7:49pm UTC](https://forum.inductiveautomation.com/t/stop-argument-evaluation/66871/1 "2022-11-23T19:49:36Z")

</div>

Is there a way in ignition to stop arguments from being evaluated before entering the method?

For example I want to inspect the argument being sent into test, but when I print it out right now I get the value False instead of something I can parse and inspect.

```auto
class Something(object):
	x = "something"

def test(a):
	print a
	
test(Something.x > 5)

```

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [November 23, 2022, 7:52pm UTC](https://forum.inductiveautomation.com/t/stop-argument-evaluation/66871/2 "2022-11-23T19:52:19Z")

</div>

No. Python doesn't make expressions into objects to pass. (This behavior is not specific to jython, and conforms to pretty much every programming language I know.)

---

<div class="post-metadata">

**Author:** ![Jonathan](https://avatars.discourse-cdn.com/v4/letter/j/aeb1de/32.png) [@Jonathan](https://forum.inductiveautomation.com/u/Jonathan)\
**Post date:** [November 23, 2022, 7:56pm UTC](https://forum.inductiveautomation.com/t/stop-argument-evaluation/66871/3 "2022-11-23T19:56:53Z")

</div>

Any idea what trickery SqlAlchemy is using? I doubt it is filtering after the dataset is returned. I would think that it is some how making a where clause from the filter methods parameter.

```auto
for (name,) in session.query(User.name).filter(User.fullname == "Ed Jones")

```

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [November 23, 2022, 8:02pm UTC](https://forum.inductiveautomation.com/t/stop-argument-evaluation/66871/4 "2022-11-23T20:02:15Z")

</div>

SQLAlchemy redefines the operators for its classes so that they defer execution. (Strictly speaking, they participate in a framework that outputs SQL to perform the comparison within the DB.) It's mind-numbingly complex. Yes, I've been under that hood.

See the "rich comparison" method signatures here:

[https://docs.python.org/2.7/reference/datamodel.html#basic-customization](https://docs.python.org/2.7/reference/datamodel.html#basic-customization)

Essentially, you have your class override those methods to, instead of returning an answer, return an object that remembers the original arguments and knows how to apply that later.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [November 23, 2022, 8:10pm UTC](https://forum.inductiveautomation.com/t/stop-argument-evaluation/66871/5 "2022-11-23T20:10:25Z")

</div>

Yeah, many things are possible through operator overloading...including making things wildly unreadable and hard to parse. "Domain specific languages", _especially_ inside of other programming languages are often a bad move. 9 times out of 10, avoid them.
