Re: [Python-ideas] Importing orphaned bytecode files
Sorry for top posting. My phone makes me! You're right: I misread. Sorry about that. -- Eric. "Ben Finney" <ben+python@benfinney.id.au> wrote:
Eric Smith <eric@trueblade.com> writes:
Ben Finney wrote:
I suggest:
* A new attribute ‘sys.import_orphaned_bytecode’. If set ‘True’, the interpreter follows the current behaviour. If ‘False’, any bytecode file satisfies an import only if it has a corresponding source file (where “corresponding” means “this source file would, if compiled, result in a bytecode file replacing this one”).
I agree with this in principle
Thanks.
but I don't see how you're going to implement it. In order to actually check this condition, aren't you going to have to compile the source code anyway? If so, just skip the bytecode file. Although I guess you could store a hash of the source in the compiled file, or other similar optimizations.
You seem to be seeing something I was careful not to write. The check is:
this source file would, if compiled, result in a bytecode file replacing this one
Nowhere there is there anything about the resulting bytecode files being equivalent. I'm limiting the check only to whether the resulting bytecode file would *replace* the existing bytecode file.
This doesn't require knowing anything at all about the contents of the current bytecode file; indeed, my intention was to phrase it so that it's checked before bothering to open the existing bytecode file.
Is there a better term for this? I'm not well-versed enough in the Python import internals to know.
-- \ “Philosophy is questions that may never be answered. Religion | `\ is answers that may never be questioned.” —anonymous | _o__) | Ben Finney
_______________________________________________ Python-ideas mailing list Python-ideas@python.org http://mail.python.org/mailman/listinfo/python-ideas
Eric Smith <eric@trueblade.com> writes:
Sorry for top posting. My phone makes me!
No, it really doesn't. If you have a broken tool, please don't inflict its brokenness on others, especially if you *know* it's broken when you use it. -- \ “Nothing so needs reforming as other people's habits.” —Mark | `\ Twain, _Pudd'n'head Wilson_ | _o__) | Ben Finney
On Wed, Dec 9, 2009 at 1:28 AM, Ben Finney <ben+python@benfinney.id.au> wrote:
Eric Smith <eric@trueblade.com> writes:
Sorry for top posting. My phone makes me!
No, it really doesn't. If you have a broken tool, please don't inflict its brokenness on others, especially if you *know* it's broken when you use it.
Top posting isn't that big of an issue. Drop it, please.
Jesse Noller <jnoller@gmail.com> writes:
On Wed, Dec 9, 2009 at 1:28 AM, Ben Finney <ben+python@benfinney.id.au> wrote:
Eric Smith <eric@trueblade.com> writes:
Sorry for top posting. My phone makes me!
No, it really doesn't. If you have a broken tool, please don't inflict its brokenness on others, especially if you *know* it's broken when you use it.
Top posting isn't that big of an issue. Drop it, please.
No bigger than other problems of poor human-to-human communication. I agree with Eric that it deserves apology, even if you don't think it's a big deal. -- \ “In any great organization it is far, far safer to be wrong | `\ with the majority than to be right alone.” —John Kenneth | _o__) Galbraith, 1989-07-28 | Ben Finney
Sorry for top posting. My phone makes me!
No, it really doesn't. If you have a broken tool, please don't inflict its brokenness on others, especially if you *know* it's broken when you use it.
Top posting isn't that big of an issue. Drop it, please.
No bigger than other problems of poor human-to-human communication. I agree with Eric that it deserves apology, even if you don't think it's a big deal.
Did you actually make a survey of c.l.p users to determine what fraction finds top posting poor human-to-human communication? My guess is that below 31%. From the top of my head only one name comes to mind who thinks top posting is at least sometimes appropriate: GvR. Note: you are free to install software that will automatically delete any post that is top posted and voila a, you will never be bothered again. Why not do that? Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown
Ben Finney wrote:
No bigger than other problems of poor human-to-human communication. I agree with Eric that it deserves apology, even if you don't think it's a big deal.
I'd prefer what Eric did (making a valid post, but apologising for using a poor tool to do so) over someone feeling they can't participate in the list discussion just because they don't have a decent email client handy. Now, if someone was to make a habit of it, then sure, they should be encouraged to switch to a better client. But the occasional post while away from your regular computer? Not a problem. Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia ---------------------------------------------------------------
participants (5)
-
Ben Finney
-
Daniel Fetchinson
-
Eric Smith
-
Jesse Noller
-
Nick Coghlan