Kara-Moon Forum
April 16, 2024, 08:30:53 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: You can go back to the main site here: Kara-Moon site
 
   Home   Help Search Login Register  
Pages: 1 [2]
  Print  
Author Topic: Can't use MMA anymore (Xubuntu)  (Read 6788 times)
bvdp
Kara-Moon Master
****
Posts: 1437


WWW
« Reply #15 on: April 27, 2020, 04:15:27 PM »

I think that is safe to ignore ... no idea why it showed up. I'm actually making a minor change to the code right now to make it a tad cleaner ... and, yes, I have tested it all and it seems to work with py2 and 3.
Logged

My online life: http://www.mellowood.ca
bvdp
Kara-Moon Master
****
Posts: 1437


WWW
« Reply #16 on: April 27, 2020, 09:00:12 PM »

This accomplishes the same task, but I think it's a bit nicer way to do it.

* patch.txt (0.35 KB - downloaded 187 times.)
Logged

My online life: http://www.mellowood.ca
sciurius
Sr. Member
****
Posts: 443



« Reply #17 on: April 28, 2020, 06:30:57 AM »

Ugly hack just to save a global variable?
Logged
bvdp
Kara-Moon Master
****
Posts: 1437


WWW
« Reply #18 on: April 28, 2020, 04:30:17 PM »

Well, not exactly a "hack". It's perfectly valid python ... and like they say: One man's ugly is another man's elegance Smiley

Actually, there is another way to do this...

def myfunc():
   if not 'depth' in myfunc.__dict__:
        myfunc.depth = 0

     myfunc.depth += 1
     if myfunc.depth >50:
          ... test level < 50 and report/error
     ... do stuff
     myfunc.depth -= 1

But, I think that is really ugly Smiley
Logged

My online life: http://www.mellowood.ca
Piteur
Jr. Member
*
Posts: 13



« Reply #19 on: May 01, 2020, 03:31:19 PM »

If you still have it, I would love to see the contents of the mmarc file you deleted was.
Sorry, it's deleted…
Logged

Xubuntu 18.04 LTS
Pages: 1 [2]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.041 seconds with 19 queries.