Is this a Python 3.x.x bug?


Login to Reply

Thread Tools Search this Thread
# 8  
Old 06-08-2017
Originally Posted by wisecracker
Hi RudiC...

So one is allowed to execute code AFTER exit has been called even if it is an ASCII string inside a variable, from awk AND Python and I thought Python was strict, what about Perl and others?
You don't "execute code AFTER exit" - you add one (or more) routines to the sequence of tasks the programme has to perform before giving control back to the caller, e.g. closing files, releasing locks, freeing allocated memory. If it is a write, you'd mayhap do it before stdout is closed, if it is just a number, you reference it just on exiting.

Awk's exit is a statement and Python's is a function.
Both - whatever they are - start quitting the programme.

Maybe it is just me but this should never be allowed to happen if the RC is not an integer.
Pascal wouldn't allow non-integers, C mayhap would - python might be somewhere in between.
This User Gave Thanks to RudiC For This Post:
wisecracker (06-08-2017)
# 9  
Old 06-12-2017
Originally Posted by wisecracker
Hi Corona688...
It was this, it always needs a redirection to a file for it to work however, so nothing like the other two and technically MUCH safer:-
Huh? That program is nonsense... Safer than what? And how?
Login to Reply

Thread Tools Search this Thread
Search this Thread:
Advanced Search

Similar Threads More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Interactive Python 3.5+ sys.stdout.write() AND sys.stderr.write() bug? wisecracker Programming 2 03-07-2017 11:24 AM
A $(( expression )) bug? wisecracker UNIX for Advanced & Expert Users 17 10-03-2016 01:56 PM
**python** unable to read the background color in python giridhar276 Shell Programming and Scripting 1 08-05-2014 03:53 AM
ksh bug? MadeInGermany UNIX for Advanced & Expert Users 11 11-22-2013 12:59 PM
"ssh suse-server 'python -V' > python-version.out" not redirecting Druonysus SuSE 3 02-13-2013 09:59 PM
is this a bug of g++? homeboy Programming 5 03-11-2011 12:30 PM
where's the bug? jon80 UNIX for Dummies Questions & Answers 4 08-31-2008 02:45 PM
bug in 43 ??? itik AIX 1 07-20-2008 07:53 AM
Is it a bug ..? nua7 Shell Programming and Scripting 1 07-14-2008 10:36 AM
logrotate bug? jjinno UNIX for Advanced & Expert Users 0 06-09-2008 05:24 PM
Bug has developed arjunjag Programming 3 07-23-2007 09:08 AM
Is this a bug or a limitation? gilberteu Shell Programming and Scripting 2 11-10-2006 06:03 AM
All times are GMT -4. The time now is 08:28 PM.

Unix & Linux Forums Content Copyright 1993-2018. All Rights Reserved.
Show Password

Not a Forum Member?
Forgot Password?