# What is 0L in the NonSerializingDataset?

**URL:** <https://forum.inductiveautomation.com/t/what-is-0l-in-the-nonserializingdataset/31251>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [January 13, 2020, 3:12pm UTC](https://forum.inductiveautomation.com/t/what-is-0l-in-the-nonserializingdataset/31251 "2020-01-13T15:12:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [January 13, 2020, 3:12pm UTC](https://forum.inductiveautomation.com/t/what-is-0l-in-the-nonserializingdataset/31251/1 "2020-01-13T15:12:14Z")

</div>

I have a form where I feed the current data on screen as a dictionary to function to handle update/inserts.

I’m now trying to implement the old data/retrieved data from when the form is first opened, as occasionally I will need to do other database operations based on changes in certain columns.

When I turn the NonSerializingDataset that is the custom property on my root container that has all the original data to populate the form, I try to turn it into a dictionary like this -

```auto
def nonSerializingDatasetToDictionary(dataset):
	"""
	Takes a dataset with columns and one row and returns a dictionary where the key = column name
	and value is tuple of row values in order
	Args:
		dataset:NonSerializingDatasetdataset, dataset you want to turn into a dictionary
	Returns:
		dictionary: dict, dictionary of the dataset 
	"""

	import system.dataset
	dict = {}
	for row in range(dataset.getRowCount()):
		for column in range(dataset.getColumnCount()):
			columnName = str(dataset.getColumnName(column))
			value = dataset.getValueAt(row, columnName)
			dict[columnName] = value
	return dict

```

Now when I make the dictionary, it’s just grabbing the appropriate value property from the components on screen and I get something like this -  
`{'sentToContact': True, 'sentToAcctNotNeeded': True, 'sentToAccounting': True, 'state': 0, 'sentToContNotNeeded': True, 'receivedConfirmation': False}`

while my non serializing dataset turns into this  
`{'sentToContact': 0, 'sentToAcctNotNeeded': 0, 'sentToAccounting': 0, 'state': 0L, 'receivedConfirmation': 0, 'sentToContNotNeeded': 0}`

I’ve tested it and all my comparisons work fine as 0 is interpreted as False and 1 as True. But why does my `state` column, which has an integer value, turn to `0L`. It works, I’ve tried comparing it with 0 and it’s fine, but I was just wonderign why it says `0L` instead of just `0`.

---

<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:** [January 13, 2020, 4:29pm UTC](https://forum.inductiveautomation.com/t/what-is-0l-in-the-nonserializingdataset/31251/2 "2020-01-13T16:29:08Z")

</div>

Java has separate types for long vs short integers (64 vs 32 bit), while Python abstracts this away from your. Jython makes this a bit more complicated, because it’s backed by the JVM, but it also attempts to abstract this away. We generally try to fix things on our own for presentation, also, but sometimes all that magic just breaks down, and you’ll get an actual ‘long’ type in Python code - which is differentiated by the L after the value.

They’re numerically equivalent, and every Python operation you’ll do between them should work, as you’ve noticed, so it’s not going to cause any problems. If you want to get rid of them, the builtin `int()` function should convert them to “real” Python integers.

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [January 13, 2020, 4:31pm UTC](https://forum.inductiveautomation.com/t/what-is-0l-in-the-nonserializingdataset/31251/3 "2020-01-13T16:31:39Z")

</div>

Thanks. Yea didn’t cause any issues I just wanted to learn more about how things work under the hood so to speak.

---

<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:** [January 13, 2020, 11:36pm UTC](https://forum.inductiveautomation.com/t/what-is-0l-in-the-nonserializingdataset/31251/4 "2020-01-13T23:36:38Z")

</div>

> [@paul-griffith](#):
>
> If you want to get rid of them, the builtin `int()` function should convert them to “real” Python integers.

Just note that python/jython will preserve a long as a long through the int() function if it doesn't fit in a signed 32-bit register. Also, python will only print the 'L' on longs if repr() is used instead of str().
