Cool.  I appreciate the clarification.  I had always taken an empty dictionary 
as a dictionary object without data, and a NIL as not an object, and the two 
were different.  This helps my PDU checking.

And I also found the update I missed which added is_pdu(), which simplifies 
some of my checking.  So, even better!

Thanks for the help,
Jeff

From: Jeff Long <willco...@gmail.com>
Sent: Thursday, June 30, 2022 8:02 AM
To: Jeff S <e070...@hotmail.com>
Cc: discuss-gnuradio@gnu.org
Subject: Re: Is PMT_NIL a Valid Dictionary?

Yes, an empty dict is NIL, so that is (confusingly) valid.

On Thu, Jun 30, 2022 at 7:05 AM Jeff S 
<e070...@hotmail.com<mailto:e070...@hotmail.com>> wrote:
GNU Radio Version:  v3.9.6.0-23-ge3506b13

I was writing a QA test and decided to try,

self.assertTrue(pmt.is_dict(pmt.PMT_NIL))

and it passes.  I was just wondering if pmt.PMT_NIL is considered a valid 
dictionary object, as opposed to,

my_dict = pmt.make_dict()
self.assertTrue(pmt.is_dict(my_dict))

Just trying to get a better understanding and couldn’t find an answer.

Regards,
Jeff

Reply via email to