Every one who, having an intent to commit an offence, does or omits an act for the purpose of accomplishing his or her object, is guilty of an attempt to commit the offence intended, whether in the circumstances it was possible to commit the offence or not.