News for hackers. Stuff that matters.
Re:Quines: self-replicating programs (2005) by identity0 on Monday May 25, 2020 @10:29PM (#23306912)
Not cheating as in “it might not work,” cheating as in “it trivializes the exercise.” The point of making a quine is a programming challenge. If python had a function called “quine()”, I would still call it cheating even if it worked 100% of the time.
Re:Quines: self-replicating programs (2005) by xamuel on Monday May 25, 2020 @10:35PM (#23306931)
Sure, which is why I said "way easier". If you were assigning quine as a python homework exercise, and you wanted an "exec" solution ruled out, you would need to explicitly rule it out in the text of the exercise.

>If python had a function called "quine()"...

If we wanted to REALLY trivialize it, just use the blank program (which prints nothing, thus prints itself). :)