ubuntu 18上的PyCharm 2018.3 def__init __(self,x,y):^ SyntaxError:无效语法

时间:2019-01-26 16:17:14

标签: pycharm ubuntu-18.04

当尝试在ubuntu 18.04上的PyCharm 2018.3中执行以下python代码段时,联想IdeaPad 110中所有更新和升级的内容

 extension MapsViewController: CLLocationManagerDelegate {
     func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
     let location : CLLocation = locations.last!
     print("Location:\(location)")
     let camera = GMSCameraPosition.camera(withLatitude: location.coordinate.latitude, longitude: location.coordinate.longitude, zoom: zoomLevel)
     if mapView.isHidden {
        mapView.isHidden = false
        mapView.camera = camera
      } 
      else {
        mapView.animate(to: camera)
    }

}
  func locationManager(_ manager: CLLocationManager, didChangeAuthorization status: CLAuthorizationStatus) {
    switch status {
    case .restricted:
        // display the map the default location
        mapView.isHidden = false
    case .denied :
        print("User denied access to location")
        mapView.isHidden = false
    case .notDetermined :
        print("Location status not deteremined")
    case .authorizedAlways  : fallthrough
    case . authorizedWhenInUse :
        print("Location status is OK")

    }
}

我遇到以下错误

  

def__init __(self,x,y):

     

^ SyntaxError:语法无效

关于我为什么会遇到此类问题的任何建议?

0 个答案:

没有答案