17-40L lens trade straight for a 50D
Well, its hard to really conclusively say if it is a good deal without considering other factors that might feed into the equation e.g. do you have a lens that will cover the 17-40mm focal range? What body or bodies do you own at the moment? What your photographic plans are going forward etc.
Otherwise, generally speaking the lens (by virtue of being an L-series) will still be at or around that price for a couple of years where as the body will be trading for significantly less.
I hope this helps.