Today in an engineering thermodynamics lecture, the professor gave an example of a gas doing work. We had a cylinder full of helium at a pressure of something like 200 kPa absolute and the valve was opened so that the gas would flow out against the atmospheric pressure until the pressures were equal. Also the cylinder was assumed to be in thermal equilibrium with its surroundings so the temperature of the gas was equal to the temperature of the ambient air. However, the way he calculated the work perturbed me. He said that this was an isobaric process because the gas was expanding against a constant atmospheric pressure. I was under the assumption that an isobaric process means that the working fluid stays at constant pressure throughout the process which is not the case in this expansion. And in this case, the gas pressure is dropping as it leaves the cylinder.
The professor then proceeded to calculate the work as $W = P_\text{atm}\Delta V$. But I didn't think that was right and that simple.
I should also note that the system was modeled as a closed system, so the gas inside the cylinder and the escaping gas were the system.
If this is not an isobaric process why is the work calculated with a constant pressure?
Am I correct, or is the professor?