Although not a replacement for a primary lock, these "cafe" locks are a great second lock - and to keep someone from just riding away with your bike when you pop into a cafe for a quick minute..
These are standard issue on Euro commuters as the lock of last resort. Since it is attached to the bike, you can never forget to bring it. Many are "key retaining" so the key stays in the lock - so that covers not being able to find you key before a ride. As a secondary lock, it can secure the rear wheel, so the primary one - Ulock or folding lock - can be used to secure the frame and the front wheel.
The lock works by immobilizing the rear wheel - so a would be thief can't just ride away with it. It does not look like much but the better versions of these are tough locks. There are accessory chains that just plug in to the body of the integrated lock - if the chain is over 8mm it can't be cut easily (like with bolt cutters). Security level of this arrangement is similar to a good Ulock or folding lock - but much faster to deploy.