Speaking as a perfectionist...
Truthfully? Never. Code can always be better: do more; gracefully handle more edge-cases; be easier/more-intuitive to use; run quicker; produce more meaningful errors; etc. What usually drives when I turn over code is the calendar.
And, while I frequently write with a "this is a first draft, I'll smooth it out later iterations," the opportunity to iterate rarely comes. Usually, someone comes along and says, "does it do 'X', yet? Ship it." Which suuuuuucks. You know what you've allowed out is hot garbage, even if it is serviceable (and better than nothing). You also know that, eventually, someone's going to come crying about ...and it will have been so long since you touched the code that "iterating" is more like "rewriting" ...frequently under the greater pressure of a tool that's become critical but needs to be pushed out to the junior guys.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.