[Scons-users] Oh dear, Winder has been an idiot…

Tom Tanner (BLOOMBERG/ LONDON) ttanner2 at bloomberg.net
Mon Mar 10 04:23:02 EDT 2014


To be fair, it's not unreasonable to expect to be able to do things with File objects. I keep running across situations where I have to Fileify or stringify something to get things to work as expected.

I probably qualify as a day 3 noob too, and at this rate, will do for a while yet

----- Original Message -----
From: scons-users at scons.org
To: andrew.featherstone at gmail.com, garyo at oberbrunner.com
Cc: scons-users at scons.org
At: Mar 8 2014 19:52:09

Gary, Andrew,

Thanks muchly for speedy and frequent responses. I have discovered I
have been making a n00b "day 3" error, and that everything works exactly
as wanted. There is no need for the str stuff, so hopefully Andrew can
simplify his codes.

sources = Glob('*.cc')
special = File('flob.cc')
source.remove(special)

works exactly as required.

Of course this is true if and only if File('flob.cc') is a reference to
the same object created in the list by Glob('*.cc') which appears to be
true at present. But is this a pure fluke or deep magic of SCons?

The issue here is that SCons.Node.FS.File does not define __eq__,
__ne__, __hash__ and so is reliant on the identity equality that is the
default.

I am embarrassed and will now crawl into a whole and wish for the thread
to be removed from the Internet history and everyone's memory.
--
Russel.
=============================================================================
Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder at ekiga.net
41 Buckmaster Road m: +44 7770 465 077 xmpp: russel at winder.org.uk
London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder

----------------------------

_______________________________________________
Scons-users mailing list
Scons-users at scons.org
http://four.pairlist.net/mailman/listinfo/scons-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://four.pairlist.net/pipermail/scons-users/attachments/20140310/163eecb7/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/octet-stream
Size: 181 bytes
Desc: not available
Url : http://four.pairlist.net/pipermail/scons-users/attachments/20140310/163eecb7/attachment-0001.obj


More information about the Scons-users mailing list