I go to several yoga classes. At one, most of the other women there are middle-aged. There's a fair amount of talk about hot flashes and divorce. The yoga is therapeutic and uses all sorts of props. I leave that class feeling pampered, extraordinarily young, and tremendously fit and flexible.
The other type of yoga class I go to is fast-pasted and uses no props. Most of the other students there are undergraduates. There's lots of of talk about classes, credit cards, and various outrageous things that other people have said or done. I can occasionally do a posture that many of the undergraduates can't, which produces extremely un-yoga-encouraged feelings of comparison and self-congratulation. However, they are pretty much all supernaturally beautiful (and I don't mean that snidely: these are just the facts, ma'am) so I doubt they give a shit that I can do a wheel or crow pose (sort of). I leave that class feeling well-worked out and extraordinarily old (not to mention unfortunate looking).
I occasionally go to a more advanced type of class at the same studio. These classes usually have a range of ages: from folks in their twenties to crazy-flexible sixty-year-olds. The students there are pretty serious yogis, for the most part. We attempt things, and I fall down a lot. We do various partner poses and have to get into very intimate positions with each other. Occasionally, I wonder if I have accidentally joined the marines, like when an instructor asks us to do eight wheel poses in a row. The despairing laughter and heavy breathing in the room at such moments creates a feeling of solidarity, even if most of the other folks usually have an easier time with the postures than I (yes, even the sixty-year-olds). I leave that class feeling humbled, out of shape, and extremely un-flexible.
I think all three sets of feelings are useful and good in their own way. If anything, it's a nice reminder that at any given time -- depending on who we're talking to -- we're all old, young, fit, fat, attractive, unfortunate looking, boring, daring, beginning, advanced.
Of course, you shouldn't compare yourself to other people at all, least of all in yoga. But as long as you're going to (and it's hard to leave that habit entirely behind), it's good to have a range of folks to compare yourself to. Gives you a healthy sense of perspective. If I'm feeling a little too cocky in one class, I can remember another where all the hard, golden bodies left me in their yoga-dust. If I'm feeling a little down on myself for not being able to do x or y arm balance, I can remind myself there's a class in which I feel downright advanced.