If its a 3800 engine and the rest of the car is nice I could not hesitate.
The 3800 basic design is from the 60',s so its a lasting all cast iron engine. Its been the standard engine in most of the full size GM',s since the 80',s. Being all cast iron it can take abuse better than most engines. Its rare to have head gasket issues. It doesn't have a timing belt that needs substitute. Just look at ads for used cars with that motor, they all have 200K on them and still run good. You don't see that on other model engines.
3.1, 3.3, 3.5 may be hit and miss based on vintage and care. If you're looking at a Roadmaster they are Chevy truck and or cop car engines so again a design from the 50',s that will run forever. If you're looking in the early 80',s you have the Buick 3.8 which was where the 3800 came from or an Oldsmobile V8 again an old lasting design.

